[issue41639] Unpickling derived class of list does not call __init__()

2021-04-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: this looks resolved? -- nosy: +gregory.p.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue41639] Unpickling derived class of list does not call __init__()

2020-09-07 Thread Andy Maier
Andy Maier added the comment: And just to be complete: That did not require implementing __reduce__(). -- ___ Python tracker ___

[issue41639] Unpickling derived class of list does not call __init__()

2020-09-07 Thread Andy Maier
Andy Maier added the comment: Thanks for the clarification. Just for the record: I have implemented __setstate__() such that it completely restores the state from just the inherited list state. That makes it independent of whether __init__() or __new__() is called: def

[issue41639] Unpickling derived class of list does not call __init__()

2020-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >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__

[issue41639] Unpickling derived class of list does not call __init__()

2020-08-26 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pitrou, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41639] Unpickling derived class of list does not call __init__()

2020-08-26 Thread Andy Maier
New submission from Andy Maier : Unpickling an object of a user class that derives from list seems to miss calling the user class's __init__() method: Consider this script, which defines a derived class of the built-in list for the purpose of creating a case insensitive list. The real