]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Correct the code example in Python 3.7's What's New (GH-5696)
authorxpvpc <32843902+xpvpc@users.noreply.github.com>
Fri, 16 Feb 2018 16:46:39 +0000 (17:46 +0100)
committerMariatta <Mariatta@users.noreply.github.com>
Fri, 16 Feb 2018 16:46:39 +0000 (08:46 -0800)
There was an extra dash in the example for re.sub().

Doc/whatsnew/3.7.rst

index c3761c565322c482262757b9b37c6709bd39bfa5..89ca5d75c85d9196f02b3e370126cf4aad5a2a6b 100644 (file)
@@ -1146,7 +1146,7 @@ Changes in the Python API
 
   :func:`re.sub()` now replaces empty matches adjacent to a previous
   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
   'x' and 'd').