[Python-Dev] Re: PEP 331: Locale-Independent Float/String Conversions

"Martin v. Löwis" martin at v.loewis.de
Tue Jul 20 18:47:40 CEST 2004


P at draigBrady.com wrote:
> Oh cool. Since we're now setting LC_NUMERIC at the glibc level
> can we fix up locale.format. It's is very simplistic at the moment
> as it groups %s items as numbers:
>     locale.format("%s",1234,1) -> '1,234'
> and treats non numbers as numbers:
>      locale.format("%s\n",1234,1) -> '12,34\n'

Indeed. The second one is incorrect usage of the function.

Feel free to submit patches. However, make sure they work on all
relevant platforms.

Regards,
Martin



More information about the Python-list mailing list