def _get_source_info_and_name(obj):
    'Attempt to get the definition file and line of obj and its name.'
    source_info = _get_source_info(obj, None)
    if (source_info is None):
        source_info = _get_source_info(type(obj))
    name = getattr(obj, '__name__', None)
    if (name is None):
        name = getattr(type(obj), '__name__', '[unknown]')
    return (source_info, name)
Attempt to get the definition file and line of obj and its name.
def _get_source_info_and_name(obj):
    
    source_info = _get_source_info(obj, None)
    if (source_info is None):
        source_info = _get_source_info(type(obj))
    name = getattr(obj, '__name__', None)
    if (name is None):
        name = getattr(type(obj), '__name__', '[unknown]')
    return (source_info, name)