Author ppperry
Recipients elliot.gorokhovsky, mdk, ppperry, serhiy.storchaka, tim.peters, vstinner
Date 2017-03-11.01:15:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <4c7969ce14c49ecdc3de59674caaa0d1.squirrel@neptune.place.org>
In-reply-to <CANZJz4i4sbhvZrq6_-W-mrvmNt9VqjM+oVryMcrCn+AidXjoPQ@mail.gmail.com>
Content
>
> 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'>"
History
Date User Action Args
2017-03-11 01:15:20ppperrysetrecipients: + ppperry, tim.peters, vstinner, serhiy.storchaka, mdk, elliot.gorokhovsky
2017-03-11 01:15:19ppperrylinkissue28685 messages
2017-03-11 01:15:17ppperrycreate