summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-10-30 10:03:53 (GMT)
committerGitHub <noreply@github.com>2019-10-30 10:03:53 (GMT)
commit865c3b257fe38154a4320c7ee6afb416f665b9c2 (patch)
treeab97967500a250cac15ac0d69aeb2c061bf313ba /Doc/whatsnew
parent25fc088607c855060ed142296dc1bd0125fad1af (diff)
downloadcpython-865c3b257fe38154a4320c7ee6afb416f665b9c2.zip
cpython-865c3b257fe38154a4320c7ee6afb416f665b9c2.tar.gz
cpython-865c3b257fe38154a4320c7ee6afb416f665b9c2.tar.bz2
bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.9.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index bca2229..d41e708 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -99,6 +99,11 @@ Other Language Changes
ignored for empty strings.
(Contributed by Victor Stinner in :issue:`37388`.)
+* ``"".replace("", s, n)`` now returns ``s`` instead of an empty string for
+ all non-zero ``n``. It is now consistent with ``"".replace("", s)``.
+ There are similar changes for :class:`bytes` and :class:`bytearray` objects.
+ (Contributed by Serhiy Storchaka in :issue:`28029`.)
+
New Modules
===========