Pickling array.array

Nicolas Fleury nid_oizo at yahoo.com_remove_the_
Fri May 14 11:36:19 EDT 2004


Nicolas Fleury wrote:
> class array(arr.array):
>     def __getstate__(self):
>         return {'buffer': self.tostring()}
>     def __setstate__(self, dict):
>         self.fromstring(dict['buffer'])

I also added __getinitargs__(), but it is not called...



More information about the Python-list mailing list