Fully qualified name for objects in Python 3.

def fullqualname_py3(obj):
    """Fully qualified name for objects in Python 3."""

    if type(obj).__name__ == 'builtin_function_or_method':

        return _fullqualname_builtin_py3(obj)

    elif type(obj).__name__ == 'function':

        return _fullqualname_function_py3(obj)

    elif type(obj).__name__ in ['member_descriptor', 'method_descriptor',
                                'wrapper_descriptor']:

        return obj.__objclass__.__module__ + '.' + obj.__qualname__

    elif type(obj).__name__ == 'method':

        return _fullqualname_method_py3(obj)

    elif type(obj).__name__ == 'method-wrapper':

        return fullqualname_py3(obj.__self__) + '.' + obj.__name__

    elif type(obj).__name__ == 'module':

        return obj.__name__

    elif type(obj).__name__ == 'property':

        return obj.fget.__module__ + '.' + obj.fget.__qualname__

    elif inspect.isclass(obj):

        return obj.__module__ + '.' + obj.__qualname__

    return obj.__class__.__module__ + '.' + obj.__class__.__qualname__