[Python-bugs-list] [ python-Bugs-699312 ] builtin type inconsistency

SourceForge.net noreply@sourceforge.net
Fri, 07 Mar 2003 02:59:08 -0800


Bugs item #699312, was opened at 2003-03-07 11:59
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=699312&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Alex Martelli (aleax)
Assigned to: Nobody/Anonymous (nobody)
Summary: builtin type inconsistency

Initial Comment:
many builtin types can be called without arguments, yielding 
the 'false' (zero/empty) instance of their type.  However, 
others can't.  why is int()==0 but calling bool() raises an 
exception rather than returning False?  I consider this 
irregularity a tiny bug.  Arguably slice() should also return 
the same result as slice(None), again for regularity, but this 
is admittedly iffier.

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

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