[Python-3000] pickle compatibility between 2.x and 3.0
Alexandre Vassalotti
alexandre at peadrop.com
Sat Nov 3 17:39:15 CET 2007
On 11/2/07, Christian Heimes <lists at cheimes.de> wrote:
> The general idea is good however a single magic method won't do any
> good. The system must be able to handle cases where an object may
> contain text strings and byte strings. Developers must be able to handle
> the conversation on a per class base.
Container objects are recursively pickled. IOW, pickle doesn't know if
a string is part of a user-defined class or some other container
object (e.g., a dict, or a tuple). Pickling objects on a per class
basis would require the pickle module to keep some sort of state
mechanism to know when a class begin and end. IMHO, the complexity
added wouldn't really worth it.
-- Alexandre
More information about the Python-3000
mailing list