diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-03-19 14:10:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-19 14:10:44 (GMT) |
commit | 92a6abf72e7a8274f96edbb5297119d4ff055be7 (patch) | |
tree | 158af2148f4027e63d9b19cfaf968b6da7848c2e /Doc | |
parent | cb7874f49d3d55df73a3c529773af14e2e344fb7 (diff) | |
download | cpython-92a6abf72e7a8274f96edbb5297119d4ff055be7.zip cpython-92a6abf72e7a8274f96edbb5297119d4ff055be7.tar.gz cpython-92a6abf72e7a8274f96edbb5297119d4ff055be7.tar.bz2 |
bpo-47066: Convert a warning about flags not at the start of the regular expression into error (GH-31994)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/re.rst | 3 | ||||
-rw-r--r-- | Doc/whatsnew/3.11.rst | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 8d62e3b..950a5b1 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -299,6 +299,9 @@ The special characters are: :func:`re.compile` function. Flags should be used first in the expression string. + .. versionchanged:: 3.11 + This construction can only be used at the start of the expression. + .. index:: single: (?:; in regular expressions ``(?:...)`` diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 8b3450e..b7e9dc6 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -688,6 +688,11 @@ Changes in the Python API if no locale is specified. (Contributed by Victor Stinner in :issue:`46659`.) +* Global inline flags (e.g. ``(?i)``) can now only be used at the start of + the regular expressions. Using them not at the start of expression was + deprecated since Python 3.6. + (Contributed by Serhiy Storchaka in :issue:`47066`.) + Build Changes ============= |