"M.-A. Lemburg" <mal@lemburg.com> writes: > >>Sure. I use pickle subclasses with hooks for various special > >> object types a lot in my applications... > > Can you provide the source of one such subclass? > > No, they are closed-source. But the idea should be obvious: > I want to pickle the various mx types faster then by > relying on the reduce mechanism. Ok. I think I could making this change without breaking your code: Subclasses won't read the memo; they will only write to it - Pickler.save is the only place that ever reads the memo. So subclasses could safely put tuples into the dictionary; the base class would then look for either tuples or numbers. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4