From: Armin Ronacher Date: Tue, 17 Jun 2008 20:07:08 +0000 (+0000) Subject: Moved PYTHON_FORMAT back to catalog. X-Git-Tag: 1.0~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0aea27c4cc3417ffa5edefa86a63ffe85271de8;p=thirdparty%2Fbabel.git Moved PYTHON_FORMAT back to catalog. --- diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index e4bb7adc..829eebc1 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -28,13 +28,24 @@ from babel import __version__ as VERSION from babel.core import Locale from babel.dates import format_datetime from babel.messages.plurals import PLURALS -from babel.util import odict, distinct, LOCALTZ, UTC, FixedOffsetTimezone, \ - PYTHON_FORMAT +from babel.util import odict, distinct, LOCALTZ, UTC, FixedOffsetTimezone __all__ = ['Message', 'Catalog', 'TranslationError'] __docformat__ = 'restructuredtext en' +PYTHON_FORMAT = re.compile(r'''(?x) + \% + (?:\(([\w]*)\))? + ( + [-#0\ +]?(?:\*|[\d]+)? + (?:\.(?:\*|[\d]+))? + [hlL]? + ) + ([diouxXeEfFgGcrs%]) +''') + + class Message(object): """Representation of a single message in a catalog.""" diff --git a/babel/util.py b/babel/util.py index 9842150d..b59918f6 100644 --- a/babel/util.py +++ b/babel/util.py @@ -31,17 +31,6 @@ __all__ = ['distinct', 'pathmatch', 'relpath', 'wraptext', 'odict', 'UTC', __docformat__ = 'restructuredtext en' -PYTHON_FORMAT = re.compile(r'''(?x) - \% - (?:\(([\w]*)\))? - ( - [-#0\ +]?(?:\*|[\d]+)? - (?:\.(?:\*|[\d]+))? - [hlL]? - ) - ([diouxXeEfFgGcrs%]) -''') - def distinct(iterable): """Yield all items in an iterable collection that are distinct.