summaryrefslogtreecommitdiffstats
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-10-10 08:06:31 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-10-10 08:06:31 (GMT)
commit7438e4b56fa6a34a021f11e1220331e841419b96 (patch)
tree5adea0024d47e6816a9e771423e247faeffab0f6 /Doc/library/re.rst
parent365e28238f3ccde7f9024a37c212381746748d54 (diff)
downloadcpython-7438e4b56fa6a34a021f11e1220331e841419b96.zip
cpython-7438e4b56fa6a34a021f11e1220331e841419b96.tar.gz
cpython-7438e4b56fa6a34a021f11e1220331e841419b96.tar.bz2
Issue 1519638: Now unmatched groups are replaced with empty strings in re.sub()
and re.subn().
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index edb2486..48e3006 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -701,6 +701,9 @@ form.
.. versionchanged:: 3.1
Added the optional flags argument.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
+
.. function:: subn(pattern, repl, string, count=0, flags=0)
@@ -710,6 +713,9 @@ form.
.. versionchanged:: 3.1
Added the optional flags argument.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
+
.. function:: escape(string)
@@ -885,6 +891,8 @@ Match objects support the following methods and attributes:
(``\g<1>``, ``\g<name>``) are replaced by the contents of the
corresponding group.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
.. method:: match.group([group1, ...])