(thing, forceload=0)
Given an object or a path to an object, get the object and its name.
Given an object or a path to an object, get the object and its name.
Given an object or a path to an object get the object and its name .
def resolve(thing, forceload=0):
    """Given an object or a path to an object, get the object and its name."""
    if isinstance(thing, str):
        object = locate(thing, forceload)
        if object is None:
            raise ImportError('''\
No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.''' % thing)
        return object, thing
    else:
        name = getattr(thing, '__name__', None)
        return thing, name if isinstance(name, str) else None
def resolve ( thing , forceload = 0 ) : if isinstance ( thing , str ) : object = locate ( thing , forceload ) if object is None : raise ImportError ( '''\
No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.''' % thing ) return object , thing else : name = getattr ( thing , '__name__' , None ) return thing , name if isinstance ( name , str ) else None