commit | bd48d27944453ad83d3ce37b2c867fa0d59a1c15 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sun Sep 11 12:50:02 2016 +0300 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Sun Sep 11 12:50:02 2016 +0300 |
tree | f5585b5ce3995541ed6cce7bb4daef97f936be89 | |
parent | 352601ca00376aaf07d4399096f985d3d8ecb96f [diff] [blame] |
Issue #22493: Inline flags now should be used only at the start of the regular expression. Deprecation warning is emitted if uses them in the middle of the regular expression.
diff --git a/Lib/fnmatch.py b/Lib/fnmatch.py index 07b1229..fd3b514 100644 --- a/Lib/fnmatch.py +++ b/Lib/fnmatch.py
@@ -106,4 +106,4 @@ res = '%s[%s]' % (res, stuff) else: res = res + re.escape(c) - return res + r'\Z(?ms)' + return r'(?s:%s)\Z' % res