def named_refs(obj):
    """
    Return all named referents of `obj`. Reuse functionality from asizeof.
    Does not return referents without a name, e.g. objects in a list.
    """
    refs = []
    v = _typedefof(obj)
    if v:
        v = v.refs
        if v and _callable(v):
            for ref in v(obj, True):
                try:
                    refs.append((ref.name, ref.ref))
                except AttributeError:
                    pass
    return refs
def named_refs ( obj ) : refs = [ ] v = _typedefof ( obj ) if v : v = v . refs if v and _callable ( v ) : for ref in v ( obj , True ) : try : refs . append ( ( ref . name , ref . ref ) ) except AttributeError : pass return refs
Return all named referents of `obj`. Reuse functionality from asizeof.
    Does not return referents without a name, e.g. objects in a list.