[issue1265] pdb bug with "with" statement
Christian Heimes
report at bugs.python.org
Tue Nov 13 02:43:57 CET 2007
Christian Heimes added the comment:
Good work Amaury! :)
I also wonder how type(cls) != cls.__class__ is possible with new style
classes. So far I found only one way and it ain't beautiful:
>>> class Meta(type):
... def __getattribute__(self, key):
... if key == "__class__": return object
... return type.__getattribute__(self, key)
...
>>> class Example(metaclass=Meta): pass
...
>>> Example.__class__
<type 'object'>
>>> type(Example)
<class '__main__.Meta'>
----------
keywords: +py3k
resolution: accepted -> fixed
status: open -> closed
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1265>
__________________________________
More information about the Python-bugs-list
mailing list