[issue6456] locale.D_* and .T_* are int, not string

2009-07-11 Thread Georg Brandl
Georg Brandl added the comment: I moved the constants' description into the nl_langinfo() description and clarified their use in r73945. -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue6456] locale.D_* and .T_* are int, not string

2009-07-10 Thread R. David Murray
R. David Murray added the comment: They can't be static string constants because they aren't constants. They depend on the current locale settings. I'm reopening this as a doc bug. -- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl resolution:

[issue6456] locale.D_* and .T_* are int, not string

2009-07-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The description of each of these constants could start like this: """ When passed to :func:`nl_langinfo`, return a string ... """ + the "Example:" paragraph should be moved in a more prominent place, near the top of the file for example. -- nosy:

[issue6456] locale.D_* and .T_* are int, not string

2009-07-10 Thread dauerbaustelle
dauerbaustelle added the comment: I would suggest to make those constants be strings. There's no need for those int values; in most cases, you want the strings and not the int values. Until then, I would put that nl_langinfo() stuff in a warning or info box (or highlight it somehow differently)

[issue6456] locale.D_* and .T_* are int, not string

2009-07-10 Thread R. David Murray
R. David Murray added the comment: If you look a little further up in the page you will see: "The nl_langinfo() function accepts one of the following keys. Most descriptions are taken from the corresponding description in the GNU C library." I agree that the descriptions of the constants are a

[issue6456] locale.D_* and .T_* are int, not string

2009-07-10 Thread dauerbaustelle
New submission from dauerbaustelle : The locale.D_* and locale.T_* attributes are ints with weird values instead of strings (see documentation[1]). Example: >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.utf8') 'en_US.utf8' >>> locale.D_T_FMT 131112 >>> locale.D_FMT 131113 >>> lo