Message178770
Thank you for the input Stefan. I was actually glancing at _decimal as an example of implementing pickling and inter-compatibility between the C and Py versions of pickles.
You've chosen compatibility by having the same class name and __reduce__ returning the exact same tuple for both implementation. This is a pretty good idea.
Unfortunately, in the case of Element it's more difficult, because the existing Py implementation does not have __reduce__, so pickle does its thing by looking at __dict__. Changing the Py version to have a __reduce__ seems risky as it may break compatibility between the different Py versions of Element (say, from 3.2) and this is bad. |
|
Date |
User |
Action |
Args |
2013-01-01 22:40:00 | eli.bendersky | set | recipients:
+ eli.bendersky, georg.brandl, jcea, larry, ezio.melotti, Arfrever, skrah, flox, santoso.wijaya, python-dev, einarfd, danielsh |
2013-01-01 22:40:00 | eli.bendersky | set | messageid: <1357080000.24.0.86328468292.issue16076@psf.upfronthosting.co.za> |
2013-01-01 22:40:00 | eli.bendersky | link | issue16076 messages |
2013-01-01 22:40:00 | eli.bendersky | create | |
|