[ python-Bugs-1005325 ] inconsistent acceptance of floats for range()

SourceForge.net noreply at sourceforge.net
Sun Aug 8 02:13:30 CEST 2004


Bugs item #1005325, was opened at 2004-08-07 17:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1005325&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 4
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: inconsistent acceptance of floats for range()

Initial Comment:
``range(1.0)`` will raise a DeprecationWarning (thanks to 
PyArg_ParseTuple() warning when a float is passed when an 
integer is expected), but if you do ``range(1e100)`` it raises a 
TypeError saying that an "integer end argument expected, got 
float".  Obviously not consistent.

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

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


More information about the Python-bugs-list mailing list