Re: [Python-Dev] backwards and forwards compatibility, the exact contents of pickle files, and IntEnum

2015年3月15日 00:16:22 -0700

On 15.03.15 07:52, Ethan Furman wrote:
So how do we fix it? There are a couple different options:
 - modify IntEnum pickle methods to return the name only
 - modify IntEnum pickle methods to pickle just like the int they represent
The first option has the advantage that in 3.4 and above, you'll get back the 
IntEnum version.
The second option has the advantage that the actual pickle contents are the 
same [1] as in previous versions.
So, the final question: Do the contents of a pickle file at a certain protocol 
have to be the some between versions, or
is it enough if unpickling them returns the correct object?
With the second option you lost the type even for 3.5+. This is a step back.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to