Message375929
From https://docs.python.org/3/library/pickle.html#pickling-class-instances:
When a class instance is unpickled, its __init__() method is usually not invoked.
If you want to change this behavior you have to implement the __reduce__ or __reduce_ex__ methods or register the object type in the global or per-pickler dispatch table. For example:
class NocaseList(list):
def __reduce__(self):
return self.__class__, (), None, iter(self) |
|
Date |
User |
Action |
Args |
2020-08-26 11:02:41 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, andymaier |
2020-08-26 11:02:40 | serhiy.storchaka | set | messageid: <1598439760.96.0.455795267871.issue41639@roundup.psfhosted.org> |
2020-08-26 11:02:40 | serhiy.storchaka | link | issue41639 messages |
2020-08-26 11:02:40 | serhiy.storchaka | create | |
|