[Python-Dev] locale and LC_NUMERIC
Fredrik Lundh
fredrik at pythonware.com
Mon Jan 9 08:51:02 CET 2006
Neal Norwitz wrote:
> > No. %-formatting should always use the C locale. One should use
> > locale.format to get locale-aware formatting.
>
> I know very little about locale's. /f assigned me a bug
> http://python.org/sf/1391872 which suggests I run all the tests in a
> different locale than C. I think this is a good idea, but when I set
> LANG or LC_ALL or LC_CTYPE in the env't the locale isn't set without
> me calling locale.setlocale(). Shouldn't we maintain the value from
> the env't?
the locale is a global program setting, and should only be "activated"
when it's actually needed.
my rationale for running the tests with a non-US locale was to increase
the chance of catching bugs where the external locale setting affects
Python's behaviour.
maybe it would be a good idea to add a "use setlocale" flag to the test-
runner ?
</F>
More information about the Python-Dev
mailing list