Message205260
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. |
|
Date |
User |
Action |
Args |
2013-12-04 23:01:11 | barry | set | recipients:
+ barry, zkrynicki |
2013-12-04 23:01:11 | barry | set | messageid: <1386198071.94.0.277892770274.issue19888@psf.upfronthosting.co.za> |
2013-12-04 23:01:11 | barry | link | issue19888 messages |
2013-12-04 23:01:11 | barry | create | |
|