Message289429
>
> Elliot Gorokhovsky added the comment:
>
> Your code changes __class__, not type, which would remain equal to
> "instance". (my understanding, could be wrong). The docs say the
> following:
>
Nope:
class A:pass
class B:pass
a = A()
a.__class__ = B
type(a)
returns "<class '__main__.B'>" |
|
Date |
User |
Action |
Args |
2017-03-11 01:15:20 | ppperry | set | recipients:
+ ppperry, tim.peters, vstinner, serhiy.storchaka, mdk, elliot.gorokhovsky |
2017-03-11 01:15:19 | ppperry | link | issue28685 messages |
2017-03-11 01:15:17 | ppperry | create | |
|