Michal Kwiatkowski <[EMAIL PROTECTED]> wrote: ... > Let me understand it clearly. If I change __class__ of an object, > existing attributes (so methods as well) of an object are still > accessible the same way and don't change its values. Only resolution of > attributes/methods not found in object is changed, as it uses new > version of __class__ to lookup names. Is this right?
Attributes of the _instance_ are unchanged. Anything that would normally be looked up in the OLD __class__, such as methods, is gone: which is why you normally set as the NEW __class__ some subclass of the old one, so that nothing is really gone;-). Alex -- http://mail.python.org/mailman/listinfo/python-list