Pickle in C does not work

Serhiy Storchaka storchaka at gmail.com
Tue Oct 20 14:08:57 EDT 2020


20.10.20 17:12, Marco Sulla пише:
> On Tue, 20 Oct 2020 at 16:07, Serhiy Storchaka <storchaka at gmail.com> wrote:
>> You can use PyDict_New() + PyDict_Merge() to create a dict from your
>> mapping.
> Well, yes, I know. I just wrote it for simplicity now. Do you think this is
> the problem?

I think that it can be more performant and maybe even simpler.

> I forgot to say that copy and deepcopy works. For what I know, they use
> __reduce__ if it's present.

They do not resolve class by name. They just use the result of
__reduce__ to reconstruct an instance.



More information about the Python-list mailing list