A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/089207.html below:

[Python-Dev] string to float containing whitespace

[Python-Dev] string to float containing whitespace [Python-Dev] string to float containing whitespaceAmaury Forgeot d'Arc amauryfa at gmail.com
Wed Apr 29 17:13:42 CEST 2009
Hi,

2009/4/29  <skip at pobox.com>:
> Someone please tell me I'm not going mad.  I could have sworn that once upon
> a time attempting to convert numeric strings to ints or floats if they
> contained whitespace raised an exception.  As far back as 1.5.2 it appears
> that float(), string.atof() and string.atoi() allow whitespace.  Maybe I'm
> thinking of trailing non-numeric, non-whitespace characters.

You are maybe referring to the Decimal constructor:
   decimal.Decimal(" 123")
fails with 2.5, but works with 2.6. (issue 1780)

-- 
Amaury Forgeot d'Arc
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4