@@ -3735,12 +3735,13 @@ arbitrary binary data.
37353735 The separator to search for may be any :term: `bytes-like object `.
37363736
37373737
3738- .. method :: bytes.replace(old, new, count=-1, / )
3739- bytearray.replace(old, new, count=-1, / )
3738+ .. method :: bytes.replace(old, new, /, count=-1)
3739+ bytearray.replace(old, new, /, count=-1)
37403740
37413741 Return a copy of the sequence with all occurrences of subsequence *old *
3742- replaced by *new *. If the optional argument *count * is given, only the
3743- first *count * occurrences are replaced.
3742+ replaced by *new *. If *count * is given, only the first *count * occurrences
3743+ are replaced. If *count * is not specified or ``-1 ``, then all occurrences
3744+ are replaced.
37443745
37453746 The subsequence to search for and its replacement may be any
37463747 :term: `bytes-like object `.
@@ -3750,6 +3751,9 @@ arbitrary binary data.
37503751 The bytearray version of this method does *not * operate in place - it
37513752 always produces a new object, even if no changes were made.
37523753
3754+ .. versionchanged :: next
3755+ *count * is now supported as a keyword argument.
3756+
37533757
37543758.. method :: bytes.rfind(sub[, start[, end]])
37553759 bytearray.rfind(sub[, start[, end]])
0 commit comments