Author serhiy.storchaka
Recipients Oren Milman, serhiy.storchaka
Date 2017-09-24.09:49:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I thought about this issue so long because I can't find good cause for __dict__ to be not a dict. Defining the __dict__ method or property doesn't affect instance dictionary and attributes lookup. It just breaks the __setstate__ method. Without having good example of overriding __dict__ I have no good test cases and don't know what a way of handling this error is better.

There is yet one disadvantage of the current implementation. The instance's dict can be lazy. It can be created only on demand, when instance's attribute is set or the __dict__ attribute is read. PyObject_GetAttrString(myself, "__dict__") creates it if it was not created. It would be more efficient to use _PyObject_GetDictPtr(). But this is a separate issue, 3.7 only.
Date User Action Args
2017-09-24 09:49:38serhiy.storchakasetrecipients: + serhiy.storchaka, Oren Milman
2017-09-24 09:49:38serhiy.storchakasetmessageid: <>
2017-09-24 09:49:38serhiy.storchakalinkissue31311 messages
2017-09-24 09:49:38serhiy.storchakacreate