[Python-bugs-list] [ python-Bugs-540874 ] BoolType should be added to types.py

noreply@sourceforge.net noreply@sourceforge.net
Sun, 07 Apr 2002 23:23:57 -0700


Bugs item #540874, was opened at 2002-04-08 02:12
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=540874&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: BoolType should be added to types.py

Initial Comment:
That's it :-)

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

>Comment By: Tim Peters (tim_one)
Date: 2002-04-08 02:23

Message:
Logged In: YES 
user_id=31435

Probably not, Brian.  types.py largely exists just for 
backward compatibility now.  If you want the bool type, 
just say "bool"!

>>> bool
<type 'bool'>
>>> type(bool)
<type 'type'>
>>> isinstance(True, bool)
True
>>>

Like also int, str, long, file, dict, ... in 2.2, what used 
to be builtin functions for constructing an object of a 
given type are now *the* type objects themselves, acting as 
constructors for objects of their types.  There's no reason 
to add them to types.py too.

Assigning to Guido in case he disagrees.

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

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