Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 751771b

Browse files
committed
#5675 followup: bytearray also has translate and maketrans.
1 parent 8642556 commit 751771b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,7 @@ The maketrans and translate methods differ in semantics from the versions
15411541
available on strings:
15421542

15431543
.. method:: bytes.translate(table[, delete])
1544+
bytearray.translate(table[, delete])
15441545

15451546
Return a copy of the bytes or bytearray object where all bytes occurring in
15461547
the optional argument *delete* are removed, and the remaining bytes have been
@@ -1557,6 +1558,7 @@ available on strings:
15571558

15581559

15591560
.. staticmethod:: bytes.maketrans(from, to)
1561+
bytearray.maketrans(from, to)
15601562

15611563
This static method returns a translation table usable for
15621564
:meth:`bytes.translate` that will map each character in *from* into the

0 commit comments

Comments
 (0)