6 Aug
2002
6 Aug
'02
10:30 p.m.
"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