Specify that pickle and marshal roundtrip.

This commit is contained in:
Guido van Rossum 2002-04-03 01:31:29 +00:00
parent b0cf9e95d0
commit c56891588c
1 changed files with 9 additions and 0 deletions

View File

@ -127,6 +127,11 @@ Review
PEP's motivation and I don't intend to make this change. (See
also the section "Clarification" below.)
9) What about pickle and marshal?
=> I've added a paragraph to the specification requiring that
bool values roundtrip when pickled or marshalled.
Rationale
@ -254,6 +259,10 @@ Specification
created. At the C level, the existing globals Py_False and
Py_True will be appropriated to refer to False and True.
True and False will properly round-trip through pickling and
marshalling; for example pickle.loads(pickle.dumps(True)) will
return True.
All built-in operations that are defined to return a Boolean
result will be changed to return False or True instead of 0 or 1.
In particular, this affects comparisons (<, <=, ==, !=, >, >=, is,