diff options
author | Guido van Rossum <guido@python.org> | 2000-05-02 15:52:33 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-02 15:52:33 +0000 |
commit | 1b6aecb08c5496402189f455c4f07654902a8a51 (patch) | |
tree | cd7ff074b23068a97e4d1ead475ec33df58020cc /Lib/sre.py | |
parent | 823eb4ba817213698f0ac197cdcd4e56b738c32b (diff) | |
download | cpython-git-1b6aecb08c5496402189f455c4f07654902a8a51.tar.gz |
I know this is only a temporary stop-gap measure, but the match() and
search() functions didn't even work because _fixflags() isn't
idempotent. I'm adding another stop-gap measure so that you can at
least use sre.search() and sre.match() with a zero flags arg.
Diffstat (limited to 'Lib/sre.py')
-rw-r--r-- | Lib/sre.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/sre.py b/Lib/sre.py index 0b4105721f..79878b35c4 100644 --- a/Lib/sre.py +++ b/Lib/sre.py @@ -31,7 +31,6 @@ def match(pattern, string, flags=0): return compile(pattern, _fixflags(flags)).match(string) def search(pattern, string, flags=0): - assert flags == 0 return compile(pattern, _fixflags(flags)).search(string) # FIXME: etc @@ -41,6 +40,6 @@ def search(pattern, string, flags=0): def _fixflags(flags): # convert flag bitmask to sequence - assert flags == 0 + assert not flags return () |