New submission from PSchaafsma:

The documentation of persistent_id prescribes that returning None will cause 
default pickling behavior. This makes sense.

However, in the Pickler.save function in pickle.py, the return value of 
persistent_id checked as boolean, causing also return values like 0 and [] to 
indicate default pickling.

This becomes a problem when unpickleable objects are identified by a simple 
index in some other list.

----------
components: Library (Lib)
messages: 172887
nosy: pschaafsma
priority: normal
severity: normal
status: open
title: pickle persistent_id return value
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16231>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to