[Python-Dev] locale.setlocale vs. locale.set_locale

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Wed, 5 Jul 2000 19:39:29 +0200


maybe it's just me, but I think it's a bit confusing to have two
functions in the same module with very similar names:

    >>> import locale

    >>> print locale.setlocale.__doc__
    (integer,string=3DNone) -> string. Activates/queries locale =
processing.

    >>> print locale.set_locale.__doc__
    Set the locale according to the localetuple (language code,
    encoding) as returned by get_locale() and get_default().

    The given codes are passed through the locale aliasing engine
    before being given to setlocale() for processing.

    category may be given as one of the LC_* values. It defaults
    to LC_ALL.


maybe "setlocale" should be changed to accept either a
string or a tuple?

(from which follows that get_locale should be "getlocale", and
get_default "getdefaultlocale".  or something...)

(btw, maybe both doc strings should mention the arguments?  or
maybe none of them should?  what does the style guide say?)

</F>