[issue20804] Sentinels identity lost when pickled (unittest.mock)

Vlastimil Zíma report at bugs.python.org
Mon Mar 3 10:24:24 CET 2014


Vlastimil Zíma added the comment:

David, first part of your comment should be added to docs. Purpose of sentinels isn't much intuitive and in my opinion documentation doesn't quite describe it.

An exception in case of pickle or copy would be much easier to understand apart from unexpected inequality. In my experience negative test in general are uncommon, so I expect usage of sentinels to ensure different objects to be rare.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20804>
_______________________________________


More information about the Python-bugs-list mailing list