On 1/9/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> >
> > I would have expected the first call to setlocale() to return de_DE.
>
> No, it shouldn't. We are providing C semantics here, which is that
> no locale functionality is activated unless the application explicitly
> asks for it.
Thanks
Georg Brandl wrote:
> import locale
> orig_locale = locale.setlocale(locale.LC_NUMERIC, '')
> locale.setlocale(locale.LC_NUMERIC, 'fr_FR')
>
> and later
>
> finally:
> locale.setlocale(locale.LC_NUMERIC, orig_locale)
>
>
> Shouldn't t
Neal Norwitz wrote:
> [EMAIL PROTECTED] ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python
>
import locale
locale.setlocale(locale.LC_ALL)
>
> 'C'
>
locale.setlocale(locale.LC_ALL, 'de_DE')
>
> 'de_DE'
>
> I would have expected the first call to setlocale() to return de_DE.
No,
Martin v. Löwis wrote:
> Georg Brandl wrote:
>> >>> import locale
>> >>> locale.setlocale(locale.LC_NUMERIC, "")
>> '[EMAIL PROTECTED]'
>> >>> "%f" % 1.0
>> '1.00'
>> >>> u"%f" % 1.0
>> u'1,00'
>> >>>
>>
>>
>> Is this intended? This breaks test_format on my box when test_builtin (met
Fredrik Lundh wrote:
> 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 ?
Sounds like a good u
On 1/8/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Georg Brandl wrote:
> > >>> import locale
> > >>> locale.setlocale(locale.LC_NUMERIC, "")
> > '[EMAIL PROTECTED]'
> > >>> u"%f" % 1.0
> > u'1,00'
> >
> > Is this intended? This breaks test_format on my box when test_builtin
> > (meth
Neal Norwitz wrote:
> > I feel I'm lacking some link here: why do you think we should do that?
>
> [EMAIL PROTECTED] ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python
> >>> import locale
> >>> locale.setlocale(locale.LC_ALL)
> 'C'
> >>> locale.setlocale(locale.LC_ALL, 'de_DE')
> 'de_DE'
>
> I w
On 1/8/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Neal Norwitz wrote:
> > 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 L
Fredrik Lundh wrote:
> maybe it would be a good idea to add a "use setlocale" flag to the test-
> runner ?
Sure!
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python
Neal Norwitz wrote:
> 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 c
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.
On 1/8/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Georg Brandl wrote:
> > >>> "%f" % 1.0
> > '1.00'
> > >>> u"%f" % 1.0
> > u'1,00'
> >
> > Is this intended? This breaks test_format on my box when test_builtin
> > (method
> > test_float_with_comma) is executed first.
>
> No. %-fo
Georg Brandl wrote:
> >>> import locale
> >>> locale.setlocale(locale.LC_NUMERIC, "")
> '[EMAIL PROTECTED]'
> >>> "%f" % 1.0
> '1.00'
> >>> u"%f" % 1.0
> u'1,00'
> >>>
>
>
> Is this intended? This breaks test_format on my box when test_builtin (method
> test_float_with_comma) is exec
Hi,
>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, "")
'[EMAIL PROTECTED]'
>>> "%f" % 1.0
'1.00'
>>> u"%f" % 1.0
u'1,00'
>>>
Is this intended? This breaks test_format on my box when test_builtin (method
test_float_with_comma) is executed first.
regards,
Georg
__
14 matches
Mail list logo