import typing


def asdict(obj) -> typing.Dict:
    """
    Provides a "look" into any Python class instance by returning a dict
    into the attribute or slot values.

    :param obj: any Python class instance
    :returns: the attribute or slot values from :paramref:`.asdict.obj`
    """
    if hasattr(obj, '__dict__'):
        return {
            k: v for k, v in obj.__dict__.items()
            if not k.startswith('_')
        }

    return {
        k: getattr(obj, k) for k in obj.__slots__
        if not k.startswith('_')
    }