Pythonic way to determine if a string is a number

Floris Bruynooghe floris.bruynooghe at gmail.com
Tue Feb 17 16:29:49 CET 2009


On Feb 16, 7:09 am, Python Nutter <pythonnut... at gmail.com> wrote:
> silly me, forgot to mention
>
> build a set from digits + '.' and use that for testing.

`.' is locale dependent.  Some locales might use `,' instead and maybe
there's even more out there that I don't know of.  So developing this
yourself from scratch seems dangerous, let it bubble down to libc
which should handle it correctly.


Regards
Floris



More information about the Python-list mailing list