[Patches] [ python-Patches-528022 ] PEP 285 - Adding a bool type

noreply@sourceforge.net noreply@sourceforge.net
Sun, 31 Mar 2002 18:46:16 -0800


Patches item #528022, was opened at 2002-03-10 00:45
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=528022&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: PEP 285 - Adding a bool type

Initial Comment:
Here's a preliminary implementation of the PEP,
including unittests  checking the promises made in the
PEP (test_bool.py) and (some) documentation.

With this 12 tests fail for me (on Linux); I'll look
into these later.  They appear shallow (mostly doctests
dying on True or False where 1 or 0 was expected).

Note: the presence of this patch does not mean that the
PEP is accepted -- it just means that a sample
implementation exists in case someone wants to explore
the effects of the PEP on their code.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-31 21:46

Message:
Logged In: YES 
user_id=6380

Here's an updated diff (booldiff2.txt). It fixes a refcount
bug in bool_repr(), and works with current CVS.

With this patch set, 10 standard tests fail for shallow
reasons having to do with str() or repr() returning False or
True instead of 0 or 1. Here are the failed tests:

    test_descr test_descrtut test_difflib test_doctest
test_extcall
    test_generators test_gettext test_richcmp
test_richcompare
    test_unicode


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=528022&group_id=5470