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

SourceForge.net noreply@sourceforge.net
Sat, 15 Mar 2003 05:45:59 -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.

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

>Comment By: Martin v. Löwis (loewis)
Date: 2003-03-15 14:45

Message:
Logged In: YES 
user_id=21627

I agree this is a bug, also I personally would not care
enough to fix it.

Would you like to work on a patch? I guess if your
observation is a principle to be followed, it needs to be
documented, also.

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

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