Re: Pickle failed __getstate__ on my customized class inherited dict

2019-11-20 Thread Peter Otten
lampahome wrote: > I make a class Wrapper inherited from dict and met problem when I want to > pickle it. > > Is there anyway to make __getstate__ of Wrapper to output a normal > dict?(Output a dict will help pickleing easily) > > > === code === > import pickle > class Wrapper(dict): > def

Re: Pickle failed __getstate__ on my customized class inherited dict

2019-11-19 Thread dieter
lampahome writes: > I make a class Wrapper inherited from dict and met problem when I want to > pickle it. > > Is there anyway to make __getstate__ of Wrapper to output a normal > dict?(Output a dict will help pickleing easily) > > > === code === > import pickle > class Wrapper(dict): > def __