]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
-- removed get_default compatibility kludge
authorFredrik Lundh <fredrik@pythonware.com>
Mon, 10 Jul 2000 19:32:19 +0000 (19:32 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Mon, 10 Jul 2000 19:32:19 +0000 (19:32 +0000)
-- added a few extra comments to locale.py

Lib/locale.py
Lib/site.py

index 1014dbd915bd930198b3f91bd76638a8282aad01..7dde040e7b4883ff3a723ad7ca25d931eb519f7a 100644 (file)
@@ -290,9 +290,12 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')):
     except (ImportError, AttributeError):
         pass
     else:
+        # make sure the code/encoding values are valid
         if sys.platform == "win32" and code and code[:2] == "0x":
             # map windows language identifier to language name
             code = windows_locale.get(int(code, 0))
+        # ...add other platform-specific processing here, if
+        # necessary...
         return code, encoding
 
     # fall back on POSIX behaviour
@@ -306,8 +309,6 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')):
         localename = 'C'
     return _parse_localename(localename)
 
-# compatibility
-get_default = getdefaultlocale
 
 def getlocale(category=LC_CTYPE):
 
index 70284e17223d0a078982a434c9178f9ecd701691..17f253a77a77b22d0b8b5d8814e29bf2317c55ef 100644 (file)
@@ -126,7 +126,7 @@ del exit
 #
 def locale_aware_defaultencoding():
     import locale
-    code, encoding = locale.get_default()
+    code, encoding = locale.getdefaultlocale()
     if encoding is None:
         encoding = 'ascii'
     try: