changeset 548:dde86441b508

rename babel.localedata.list() to ease Python 3 transition (fixes #250)
author fschwarz
date Sat, 19 Mar 2011 19:48:23 +0000
parents 274f9a6485d4
children 12d5425fb430
files babel/localedata.py babel/messages/frontend.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/babel/localedata.py
+++ b/babel/localedata.py
@@ -25,7 +25,7 @@
     import dummy_threading as threading
 from UserDict import DictMixin
 
-__all__ = ['exists', 'list', 'load']
+__all__ = ['exists', 'locale_identifiers', 'load']
 __docformat__ = 'restructuredtext en'
 
 _cache = {}
@@ -45,7 +45,7 @@
     return os.path.exists(os.path.join(_dirname, '%s.dat' % name))
 
 
-def list():
+def locale_identifiers():
     """Return a list of all locale identifiers for which locale data is
     available.
     
--- a/babel/messages/frontend.py
+++ b/babel/messages/frontend.py
@@ -626,7 +626,7 @@
 
         self._configure_logging(options.loglevel)
         if options.list_locales:
-            identifiers = localedata.list()
+            identifiers = localedata.locale_identifiers()
             longest = max([len(identifier) for identifier in identifiers])
             identifiers.sort()
             format = u'%%-%ds %%s' % (longest + 1)
Copyright (C) 2012-2017 Edgewall Software