[SciPy-Dev] Custom __repr__?
Hans Dembinski
hans.dembinski at gmail.com
Thu May 13 03:29:38 EDT 2021
> On 12. May 2021, at 10:00, Andrew Nelson <andyfaff at gmail.com> wrote:
>
> What would be nice would be to have a proper __repr__ that would allow objects to be recreated. I would find both the following useful in serialisation: [...]
Having a proper __repr__ that allows to recreate objects is nice, but serialization seems to be a misuse of __repr__. We have the __getstate__ __setstate__ mechanism in Python for serialization. Could you explain your use case a bit more for my curiosity?
More information about the SciPy-Dev
mailing list