diff options
author | Przemyslaw Gajda <quermit@gmail.com> | 2012-04-23 10:21:50 +0200 |
---|---|---|
committer | Przemyslaw Gajda <quermit@gmail.com> | 2012-04-23 10:21:50 +0200 |
commit | 79375ce4d544a241b6db64e4a266a66fc35e86cb (patch) | |
tree | f5c8d88203db79d8c5d1ad225a319044ba59bdc8 | |
parent | 48a9b764032e1fce54e9d871a1c4f2d9ecf7d232 (diff) | |
download | pymox-79375ce4d544a241b6db64e4a266a66fc35e86cb.tar.gz |
Py3k always sets re.U flag, so the resulting regex.flags are equals to flags | re.U.
-rwxr-xr-x | mox.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |