Bugs item #1255395, was opened at 2005-08-09 20:15 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1255395&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Windows Group: Platform-specific Status: Closed Resolution: Invalid Priority: 5 Submitted By: Steven Bird (stevenbird) Assigned to: Nobody/Anonymous (nobody) Summary: float('-inf') Initial Comment: Python 2.4.1 on Windows raises "ValueError: invalid literal for float(): -inf", though this works just fine on unix distributions of Python 2.4.1. ---------------------------------------------------------------------- >Comment By: Raymond Hettinger (rhettinger) Date: 2005-08-11 13:21 Message: Logged In: YES user_id=80475 FWIW, googling for the phrase does lead directly to revelant discussion of the issues. ---------------------------------------------------------------------- Comment By: Terry J. Reedy (tjreedy) Date: 2005-08-11 12:33 Message: Logged In: YES user_id=593130 Snide comments are out of place here. Standard C 89 is generally considered one language even though it has many platform dependencies. Heroic efforts, mostly volunteer, have gone into masking many platform variations. (For instance, look thru the C sources for system/compiler #ifdefs.) These efforts continue. http://docs.python.org/lib/built-in-funcs.html, float([x]) says "Note: When passing in a string, values for NaN and Infinity may be returned, depending on the underlying C library. The specific set of strings accepted which cause these values to be returned depends entirely on the C library and is known to vary." Please read the docs before claiming that documented behavior is a bug. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-08-10 07:56 Message: Logged In: YES user_id=6656 Well, everything to do with special floating point values is a platform dependent crapshoot (in fact, if you want to read more, googling for "platform dependent crapshoot" works quite well...). Are you interested in working on a patch? It's probably not straightforward at all. ---------------------------------------------------------------------- Comment By: Steven Bird (stevenbird) Date: 2005-08-10 07:49 Message: Logged In: YES user_id=195736 Oh, I thought Python 2.4.1 was the same language, regardless of which platform it was running on. I must be missing something here. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-08-10 07:35 Message: Logged In: YES user_id=6656 At most, this is a feature request (why did you think it would work?). Floating point to string (and vice versa) conversions are done by the C library implementation, and sadly they are no consistent (you'll notice that printing an infinite value on windows doesn't print out 'inf' either). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1255395&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com