[New-bugs-announce] [issue13577] __qualname__ is not present on builtin methods and functions

Meador Inge report at bugs.python.org
Sun Dec 11 05:27:05 CET 2011


New submission from Meador Inge <meadori at gmail.com>:

I was recently experimenting with the new PEP 3155 '__qualname__ implementation and noticed that '__qualname__' is not present on builtin methods and functions:

[meadori at motherbrain cpython]$ ./python 
Python 3.3.0a0 (default:aab45b904141+, Dec 10 2011, 14:53:54) 
[GCC 4.6.2 20111027 (Red Hat 4.6.2-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> max.__qualname__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'builtin_function_or_method' object has no attribute '__qualname__'
>>> str.strip.__qualname__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'method_descriptor' object has no attribute '__qualname__'

I will work up a patch.

----------
components: Interpreter Core
messages: 149209
nosy: meador.inge, pitrou
priority: high
severity: normal
stage: needs patch
status: open
title: __qualname__ is not present on builtin methods and functions
type: behavior
versions: Python 3.3

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


More information about the New-bugs-announce mailing list