[Python-Dev] changing the locale.py interface?

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Sat, 8 Jul 2000 21:12:45 +0200


http://sourceforge.net/patch/index.php?func=3Ddetailpatch&patch_id=3D1007=
65&group_id=3D5470

Patch #100765 tightens up the new parts of the locale.py interface,
and adds support for platform-dependent locale mechanisms.

Here's a summary of the changes:

- merged setlocale and set_locale.  the internal setlocale
  function is overridden by a python version which accepts
  *either* a string (old behaviour) or a locale tuple.

- renamed a few methods (for consistency):

        get_locale =3D> getlocale
        get_default_locale =3D> getdefaultlocale
        set_to_default =3D> resetlocale (!)

- the _locale implementation module can now implement
  an optional _getdefaultlocale function.  if that function
  isn't available, a POSIX-based approach is used (check
  LANG and other environment variables).

comments?

</F>