embray / gappy

Python interface to GAP
GNU General Public License v3.0
13 stars 5 forks source link

Pickling support #3

Open embray opened 3 years ago

embray commented 3 years ago

Sage's libgap provides a __reduce__ function for pickling GapElements. However, it's fairly dependent on Sage, since where possible it will convert to the appropriate Sage/Python type, pickle that, and then convert it back to a GAP object when unpickling.

As a fallback it will also pickle the GAP object's str() representation, and then try to gap.eval() it on restore, but this is not always terribly reliable.

So gappy removes explicit pickling support for now, but it might be useful to add back in; need to find out what the current state-of-the-art is for serialization of GAP objects.