Skip to content

Commit b65cb16

Browse files
xpvpcMariatta
authored andcommitted
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().
1 parent 997b8c1 commit b65cb16

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
@@ -1146,7 +1146,7 @@ Changes in the Python API
11461146

11471147
:func:`re.sub()` now replaces empty matches adjacent to a previous
11481148
non-empty match. For example ``re.sub('x*', '-', 'abxd')`` returns now
1149-
``'-a-b--d-'`` instead of ``'-a-b--d-'`` (the first minus between 'b' and
1149+
``'-a-b--d-'`` instead of ``'-a-b-d-'`` (the first minus between 'b' and
11501150
'd' replaces 'x', and the second minus replaces an empty string between
11511151
'x' and 'd').
11521152

0 commit comments

Comments
 (0)