[issue13577] __qualname__ is not present on builtin methods and functions

Antoine Pitrou report at bugs.python.org
Mon Dec 12 14:27:09 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

About method_qualname.patch:

- apparently you forgot to add BuiltinFunctionPropertiesTest in test_main()?

- a static method keeps a reference to the type: I think it's ok, although I'm not sure about the consequences (Guido, would you have an idea?)

- about "XXX Note that it is not possible to use __qualname__ to distinguish a builtin bound instance method from its unbound equivalent", I don't think it's a problem. People can e.g. check for __self__:

>>> list.append.__self__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'method_descriptor' object has no attribute '__self__'
>>> list().append.__self__
[]

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13577>
_______________________________________


More information about the Python-bugs-list mailing list