Converting a string to the most probable type

John Machin sjmachin at
Mon Mar 10 22:09:34 CET 2008

On Mar 11, 2:24 am, rockingred <willsteve2... at> wrote:
> In the case where dots are used as a date separator, count the number
> of dots (you should also count commas).  If a single comma appears and
> is preceeded by only numbers or numbers with decimals, assume "foreign
> float".

Bzzzzt. 1,234 is the integer 1234 to John, and its only a float to
Jean if Jean is not a Scots lass :-)

More information about the Python-list mailing list