Staging
v0.5.1
https://github.com/python/cpython
Revision 36f7e938f287adb4a5c00bb66c5479357dfa9c26 authored by Tim Peters on 23 July 2003, 00:05:07 UTC, committed by Tim Peters on 23 July 2003, 00:05:07 UTC
Obtain the original locale in the documented way.  This way actually
works for me.

Restore the original locale at the end, instead of forcing to "C".

Move the locale fiddling into the test driver instead of doing it as a
side effect of merely importing the module.  I don't know why the test
is mucking with locale (and also added a comment saying so), but it
surely has no justification for doing that as an import side-effect.
Now whenever the locale-changing code executes, the locale-restoring code
will also get run.
1 parent d1deac0
History
Tip revision: 36f7e938f287adb4a5c00bb66c5479357dfa9c26 authored by Tim Peters on 23 July 2003, 00:05:07 UTC
Fred wasn't kidding -- there really are docs for the locale module <wink>.
Tip revision: 36f7e93
File Mode Size
bdist_wininst
example_nt
os2emx
os2vacpp
WinMain.c -rw-r--r-- 447 bytes
_winreg.c -rw-r--r-- 42.1 KB
config.c -rw-r--r-- 3.0 KB
dl_nt.c -rw-r--r-- 908 bytes
dllbase_nt.txt -rw-r--r-- 3.3 KB
frozen_dllmain.c -rw-r--r-- 3.6 KB
getpathp.c -rw-r--r-- 17.5 KB
import_nt.c -rw-r--r-- 2.4 KB
msvcrtmodule.c -rwxr-xr-x 4.9 KB
py.ico -rw-r--r-- 766 bytes
pyc.ico -rw-r--r-- 766 bytes
pycon.ico -rw-r--r-- 766 bytes
pyconfig.h -rw-r--r-- 16.4 KB
python.mk -rw-r--r-- 234 bytes
python_exe.rc -rw-r--r-- 49 bytes
python_nt.rc -rw-r--r-- 2.7 KB
readme.txt -rw-r--r-- 4.1 KB
testpy.py -rw-r--r-- 850 bytes
w9xpopen.c -rw-r--r-- 3.6 KB
winsound.c -rw-r--r-- 7.1 KB

readme.txt

back to top