Barry A. Warsaw added the comment:
At best, this is an undocumented (afaict) change in behavior in 3.3. Let's
boil it down:
-----snip snip-----
class Type(type):
def __new__(mcls, name, bases, namespace):
return super().__new__(mcls, 'foo', bases, namespace)
class Obj(metaclass=Type):
def __init__(self, **kwargs):
pass
print(repr(Obj))
-----snip snip-----
In <= 3.2, this prints <class '__main__.foo'>
In >= 3.3 this prints <class '__main__.Obj'>
So, clearly this is a change in behavior. Was it intended? If so, it's
undocumented - I can find no mention of it in Misc/NEWS or What's New in 3.3.
I suspect it is unintended.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19888>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com