Message230591
| Author |
techdragon |
| Recipients |
techdragon |
| Date |
2014年11月04日.08:44:03 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1415090644.24.0.620494684539.issue22790@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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')
" |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年11月04日 08:44:04 | techdragon | set | recipients:
+ techdragon |
| 2014年11月04日 08:44:04 | techdragon | set | messageid: <1415090644.24.0.620494684539.issue22790@psf.upfronthosting.co.za> |
| 2014年11月04日 08:44:04 | techdragon | link | issue22790 messages |
| 2014年11月04日 08:44:03 | techdragon | create |
|