diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-16 12:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 12:38:26 +0200 |
commit | 05cb728d68a278d11466f9a6c8258d914135c96c (patch) | |
tree | da7fd67bdacf4239d820bcf40cad9f60cab9fb82 /Lib/re.py | |
parent | 3daaafb700df45716bb55f3a293f88773baf3463 (diff) | |
download | cpython-git-05cb728d68a278d11466f9a6c8258d914135c96c.tar.gz |
bpo-30349: Raise FutureWarning for nested sets and set operations (#1553)
in regular expressions.
Diffstat (limited to 'Lib/re.py')
-rw-r--r-- | Lib/re.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -251,8 +251,9 @@ def template(pattern, flags=0): # SPECIAL_CHARS # closing ')', '}' and ']' # '-' (a range in character set) +# '&', '~', (extended character set operations) # '#' (comment) and WHITESPACE (ignored) in verbose mode -_special_chars_map = {i: '\\' + chr(i) for i in b'()[]{}?*+-|^$\\.# \t\n\r\v\f'} +_special_chars_map = {i: '\\' + chr(i) for i in b'()[]{}?*+-|^$\\.&~# \t\n\r\v\f'} def escape(pattern): """ |