diff options
Diffstat (limited to 'Lib/re.py')
-rw-r--r-- | Lib/re.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -224,6 +224,8 @@ def _compile(*key): return p pattern, flags = key if isinstance(pattern, _pattern_type): + if flags: + raise ValueError('Cannot process flags argument with a compiled pattern') return pattern if not sre_compile.isstring(pattern): raise TypeError("first argument must be string or compiled pattern") |