sbt <shibt...@gmail.com> added the comment: There are some callables which are missing __qualname__:
method_descriptor wrapper_descriptor builtin_function_or_method For the descriptors, at least, obj.__qualname__ should be equivalent to obj.__objclass__.__qualname__ + '.' + obj.__name__ Were these overlooked? PS C:\Repos\cpython> .\PCbuild\python_d Python 3.3.0a0 (default, Nov 25 2011, 22:14:28) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pickle [66213 refs] >>> attribs = ('__class__', '__name__', '__qualname__') [66220 refs] >>> for o in (pickle.Pickler, pickle.Pickler.dump, object.__init__, min): ... print([getattr(o, a, None) for a in attribs]) ... [<class 'type'>, 'Pickler', 'Pickler'] [<class 'method_descriptor'>, 'dump', None] [<class 'wrapper_descriptor'>, '__init__', None] [<class 'builtin_function_or_method'>, 'min', None] [66265 refs] Also I notice that bound methods have a misleading __qualname__: >>> class A: ... def f(self): pass ... [66348 refs] >>> A().f.__qualname__ 'A.f' Maybe this should be 'A().f' instead. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13448> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com