[New-bugs-announce] [issue22790] __qualname__ missing from dir(__class__) during class initialisation
Sam Bishop
report at bugs.python.org
Tue Nov 4 09:44:04 CET 2014
New submission from Sam Bishop:
The output of performing "dir(__class__)" during a class' __init__ method, seems to be lacking the new '__qualname__' attribute in python 3.
This rough test can be pasted right into the python 3.4 REPL to see the issue.
Tested on 64bit python 3.4 running on OSX 10.9
"
class Foo:
class Bar(object):
keywords = dict()
def __init__(self, **kwargs):
print(dir(__class__))
print(''.join(('"str(__class__.__qualname__)" = ', str(__class__.__qualname__))))
print(''.join((
'Is "__qualname__" in the output of the dir() function? : ',
str(('__qualname__' in dir(__class__))))))
self.keywords = kwargs
test = Foo.Bar(see='We are missing something here')
"
----------
components: Interpreter Core
messages: 230591
nosy: techdragon
priority: normal
severity: normal
status: open
title: __qualname__ missing from dir(__class__) during class initialisation
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22790>
_______________________________________
More information about the New-bugs-announce
mailing list