changeset 356:ed20c467d223

Moved PYTHON_FORMAT back to catalog.
author aronacher
date Tue, 17 Jun 2008 20:07:08 +0000
parents 2b74cff3c612
children 9acf6b5baa22
files babel/messages/catalog.py babel/util.py
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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."""
 
--- 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.
 
Copyright (C) 2012-2017 Edgewall Software