From d553431a72b919053d75799157087de307035f33 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 25 Jul 2013 09:20:32 +0200 Subject: [PATCH] Some codestyle updates in babel.localedata --- babel/localedata.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/babel/localedata.py b/babel/localedata.py index e05b6a94..88883ac8 100644 --- a/babel/localedata.py +++ b/babel/localedata.py @@ -18,8 +18,6 @@ from collections import MutableMapping from babel._compat import pickle -__all__ = ['exists', 'locale_identifiers', 'load'] - _cache = {} _cache_lock = threading.RLock() @@ -27,11 +25,10 @@ _dirname = os.path.join(os.path.dirname(__file__), 'localedata') def exists(name): - """Check whether locale data is available for the given locale. + """Check whether locale data is available for the given locale. Ther + return value is `True` if it exists, `False` otherwise. :param name: the locale identifier string - :return: `True` if the locale data exists, `False` otherwise - :rtype: `bool` """ if name in _cache: return True @@ -42,9 +39,9 @@ def locale_identifiers(): """Return a list of all locale identifiers for which locale data is available. + .. versionadded:: 0.8.1 + :return: a list of locale identifiers (strings) - :rtype: `list` - :since: version 0.8.1 """ return [stem for stem, extension in [ os.path.splitext(filename) for filename in os.listdir(_dirname) @@ -73,8 +70,6 @@ def load(name, merge_inherited=True): :param name: the locale identifier string (or "root") :param merge_inherited: whether the inherited data should be merged into the data of the requested locale - :return: the locale data - :rtype: `dict` :raise `IOError`: if no locale data file is found for the given locale identifer, or one of the locales it inherits from """ -- 2.47.2