summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Gajda <quermit@gmail.com>2012-04-23 10:21:50 +0200
committerPrzemyslaw Gajda <quermit@gmail.com>2012-04-23 10:21:50 +0200
commit79375ce4d544a241b6db64e4a266a66fc35e86cb (patch)
treef5c8d88203db79d8c5d1ad225a319044ba59bdc8
parent48a9b764032e1fce54e9d871a1c4f2d9ecf7d232 (diff)
downloadpymox-79375ce4d544a241b6db64e4a266a66fc35e86cb.tar.gz
Py3k always sets re.U flag, so the resulting regex.flags are equals to flags | re.U.
-rwxr-xr-xmox.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mox.py b/mox.py
index 4dddf61..cbf73aa 100755
--- a/mox.py
+++ b/mox.py
@@ -1439,7 +1439,7 @@ class Regex(Comparator):
# flags passed to re.compile function as the second argument
flags: int
"""
-
+ self.flags = flags
self.regex = re.compile(pattern, flags=flags)
def equals(self, rhs):
@@ -1456,8 +1456,8 @@ class Regex(Comparator):
def __repr__(self):
s = '<regular expression \'%s\'' % self.regex.pattern
- if self.regex.flags:
- s += ', flags=%d' % self.regex.flags
+ if self.flags:
+ s += ', flags=%d' % self.flags
s += '>'
return s