# HG changeset patch # User aronacher # Date 1213733228 0 # Node ID ed20c467d2232e03b04e89c7419c8adeee38b0d8 # Parent 2b74cff3c612e49b850a91d3f2c25dfed188ae63 Moved PYTHON_FORMAT back to catalog. diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -28,13 +28,24 @@ 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 --- a/babel/util.py +++ b/babel/util.py @@ -31,17 +31,6 @@ __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.