Skip to content

Commit 803e1a5

Browse files
Correct the code example in Python 3.7's What's New (GH-5696)
There was an extra dash in the example for re.sub(). (cherry picked from commit b65cb16) Co-authored-by: xpvpc <32843902+xpvpc@users.noreply.github.com>
1 parent af6eaae commit 803e1a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/whatsnew/3.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ Changes in the Python API
11571157

11581158
:func:`re.sub()` now replaces empty matches adjacent to a previous
11591159
non-empty match. For example ``re.sub('x*', '-', 'abxd')`` returns now
1160-
``'-a-b--d-'`` instead of ``'-a-b--d-'`` (the first minus between 'b' and
1160+
``'-a-b--d-'`` instead of ``'-a-b-d-'`` (the first minus between 'b' and
11611161
'd' replaces 'x', and the second minus replaces an empty string between
11621162
'x' and 'd').
11631163

0 commit comments

Comments
 (0)