diff --git a/pep-0285.txt b/pep-0285.txt index 598628602..c9adbc0e7 100644 --- a/pep-0285.txt +++ b/pep-0285.txt @@ -7,7 +7,7 @@ Status: Draft Type: Standards Track Created: 8-Mar-2002 Python-Version: 2.3 -Post-History: 8-Mar-2002 (python-dev) +Post-History: 8-Mar-2002 Abstract @@ -82,6 +82,19 @@ Specification False = bool(0, _create=1) True = bool(1, _create=1) + The values False and True will be singletons, like None; the C + implementation will not allow other instances of bool to be + created. + + 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, + is not, in, not it), the unary operator 'not', and built-in + functions like hasattr(), isinstance() and issubclass(), the dict + method has_key(), string methods endswith(), isalnum(), isalpha(), + isdigit(), islower(), isspace(), istitle(), isupper(), and + startswith(), and the closed attribute of file objects. + Issues