[Python-bugs-list] [ python-Bugs-455775 ] float parsing discrepancy

noreply@sourceforge.net noreply@sourceforge.net
Mon, 27 Aug 2001 07:25:08 -0700


Bugs item #455775, was opened at 2001-08-27 07:25
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=455775&group_id=5470

Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: float parsing discrepancy

Initial Comment:
Typing "3e" or "3e-" or "3e+" to the >>> prompt
or passing them to eval all return 3, which is
reasonable.

Passing any of these strings to float() throws
a value error exception.

What's the deal?

I think float() and the parser should accept the
same set of strings representing floats.  My 
preference (at least for what I'm currently doing)
is to update float() to act like eval rather than
the other way around, but either way is consistent.


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

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