Unverified Kaydet (Commit) 803e1a57 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) GitHub

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 b65cb163)
Co-authored-by: 's avatarxpvpc <32843902+xpvpc@users.noreply.github.com>
üst af6eaae3
...@@ -1157,7 +1157,7 @@ Changes in the Python API ...@@ -1157,7 +1157,7 @@ Changes in the Python API
:func:`re.sub()` now replaces empty matches adjacent to a previous :func:`re.sub()` now replaces empty matches adjacent to a previous
non-empty match. For example ``re.sub('x*', '-', 'abxd')`` returns now non-empty match. For example ``re.sub('x*', '-', 'abxd')`` returns now
``'-a-b--d-'`` instead of ``'-a-b--d-'`` (the first minus between 'b' and ``'-a-b--d-'`` instead of ``'-a-b-d-'`` (the first minus between 'b' and
'd' replaces 'x', and the second minus replaces an empty string between 'd' replaces 'x', and the second minus replaces an empty string between
'x' and 'd'). 'x' and 'd').
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment