[Python-Dev] Python and the Unicode Character Database
M.-A. Lemburg
mal at egenix.com
Fri Dec 3 00:37:13 CET 2010
Eric Smith wrote:
> On 12/2/2010 5:43 PM, M.-A. Lemburg wrote:
>> Eric Smith wrote:
>>>> The current behavior should go nowhere; it is not useful. Something
>>>> very
>>>> similar to the current behavior (but done correctly) should go into the
>>>> locale module.
>>>
>>> I agree with everything Martin says here. I think the basic premise is:
>>> you won't find strings "in the wild" that use non-ASCII digits but do
>>> use the ASCII dot as a decimal point. And that's what float() is looking
>>> for. (And that doesn't even begin to address what it expects for an
>>> exponent 'e'.)
>>
>> http://en.wikipedia.org/wiki/Decimal_mark
>>
>> "In China, comma and space are used to mark digit groups because dot
>> is used as decimal mark."
>
> Is that an ASCII dot? That page doesn't say.
Yes, but to be fair: I think that the page actually refers to the
use of the Arabic numeral format in China, rather than with their
own script symbols.
>> Note that float() can also parse integers, it just returns them as
>> floats :-)
>
> :)
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Dec 02 2010)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-Dev
mailing list