[Python-checkins] python/dist/src/Doc/lib liblocale.tex,1.35,1.36

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Jun 8 14:53:13 EDT 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26461/Doc/lib

Modified Files:
	liblocale.tex 
Log Message:
Patch #774665: Make Python LC_NUMERIC agnostic.


Index: liblocale.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liblocale.tex,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** liblocale.tex	3 Sep 2003 04:50:13 -0000	1.35
--- liblocale.tex	8 Jun 2004 18:52:41 -0000	1.36
***************
*** 457,479 ****
  perhaps to find out whether or not the locale is \samp{C}).
  
- When Python is embedded in an application, if the application sets the
- locale to something specific before initializing Python, that is
- generally okay, and Python will use whatever locale is set,
- \emph{except} that the \constant{LC_NUMERIC} locale should always be
- \samp{C}.
- 
- The \function{setlocale()} function in the \module{locale} module
- gives the Python programmer the impression that you can manipulate the
- \constant{LC_NUMERIC} locale setting, but this not the case at the C
- level: C code will always find that the \constant{LC_NUMERIC} locale
- setting is \samp{C}.  This is because too much would break when the
- decimal point character is set to something else than a period
- (e.g. the Python parser would break).  Caveat: threads that run
- without holding Python's global interpreter lock may occasionally find
- that the numeric locale setting differs; this is because the only
- portable way to implement this feature is to set the numeric locale
- settings to what the user requests, extract the relevant
- characteristics, and then restore the \samp{C} numeric locale.
- 
  When Python code uses the \module{locale} module to change the locale,
  this also affects the embedding application.  If the embedding
--- 457,460 ----




More information about the Python-checkins mailing list