[Python-checkins] CVS: python/dist/src/Lib locale.py,1.13,1.14
Tim Peters
tim_one@users.sourceforge.net
Wed, 24 Jan 2001 02:13:49 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4271/python/dist/src/Lib
Modified Files:
locale.py
Log Message:
test___all__ was failing on WIndows because locale.py doesn't really
know which names it exports. Didn't fix its ignorance, but patched
over the consequence.
Index: locale.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/locale.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** locale.py 2001/01/24 06:27:27 1.13
--- locale.py 2001/01/24 10:13:46 1.14
***************
*** 17,26 ****
#
# If this fails, fall back on a basic 'C' locale emulation.
- #
__all__ = ["setlocale","Error","localeconv","strcoll","strxfrm",
"format","str","atof","atoi","LC_CTYPE","LC_COLLATE",
! "LC_TIME","LC_MONETARY","LC_NUMERIC","LC_MESSAGES",
! "LC_ALL","CHAR_MAX"]
try:
--- 17,26 ----
#
# If this fails, fall back on a basic 'C' locale emulation.
+ # Yuck: LC_MESSAGES is non-standard: can't tell whether it exists before
+ # trying the import. So __all__ is also fiddled at the end of the file.
__all__ = ["setlocale","Error","localeconv","strcoll","strxfrm",
"format","str","atof","atoi","LC_CTYPE","LC_COLLATE",
! "LC_TIME","LC_MONETARY","LC_NUMERIC", "LC_ALL","CHAR_MAX"]
try:
***************
*** 700,703 ****
--- 700,710 ----
###
+
+ try:
+ LC_MESSAGES
+ except:
+ pass
+ else:
+ __all__.append("LC_MESSAGES")
if __name__=='__main__':