Message178770
| Author |
eli.bendersky |
| Recipients |
Arfrever, danielsh, einarfd, eli.bendersky, ezio.melotti, flox, georg.brandl, jcea, larry, python-dev, santoso.wijaya, skrah |
| Date |
2013年01月01日.22:40:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1357080000.24.0.86328468292.issue16076@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|