summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-01-04 17:20:11 (GMT)
committerGitHub <noreply@github.com>2018-01-04 17:20:11 (GMT)
commit87be28f4a1c5b76926c71a3d9f92503f9eb82d51 (patch)
treed11b0f8de8a5b788e52d8fa2b08646e76e2093bf /Doc
parent78e24d4415c37e9e9951920bc31e9ee4868d86cb (diff)
downloadcpython-87be28f4a1c5b76926c71a3d9f92503f9eb82d51.zip
cpython-87be28f4a1c5b76926c71a3d9f92503f9eb82d51.tar.gz
cpython-87be28f4a1c5b76926c71a3d9f92503f9eb82d51.tar.bz2
bpo-31672: Restore the former behavior when override flags in Template. (#5099)
Overriding flags to 0 will make the default pattern matching only lower case letters.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/string.rst9
1 files changed, 2 insertions, 7 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index e960678..fc3d94b 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -755,19 +755,14 @@ attributes:
* *idpattern* -- This is the regular expression describing the pattern for
non-braced placeholders. The default value is the regular expression
- ``(?a:[_a-zA-Z][_a-zA-Z0-9]*)``. If this is given and *braceidpattern* is
+ ``(?a:[_a-z][_a-z0-9]*)``. If this is given and *braceidpattern* is
``None`` this pattern will also apply to braced placeholders.
.. note::
Since default *flags* is ``re.IGNORECASE``, pattern ``[a-z]`` can match
with some non-ASCII characters. That's why we use the local ``a`` flag
- here. Further, with the default *flags* value, including ``A-Z`` in the
- ranges is redundant, but required for backward compatibility.
-
- While *flags* is kept to ``re.IGNORECASE`` for backward compatibility,
- you can override it to ``0`` or ``re.IGNORECASE | re.ASCII`` when
- subclassing.
+ here.
.. versionchanged:: 3.7
*braceidpattern* can be used to define separate patterns used inside and