From a30e730977c3ac07599a336596027d82b032263f Mon Sep 17 00:00:00 2001 From: Bonu Krishna Chaitanya Date: Sat, 30 Aug 2025 11:28:36 +0530 Subject: [PATCH 1/4] add `bytearray` as usable to `bytes.maketrans` and `bytearray.maketrans`. --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 3320f7c3bba728..19b0d87957197a 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3306,7 +3306,7 @@ arbitrary binary data. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /) - This static method returns a translation table usable for + This static method returns a translation table usable for bytearray or :meth:`bytes.translate` that will map each character in *from* into the character at the same position in *to*; *from* and *to* must both be :term:`bytes-like objects ` and have the same length. From ec9c67b0bf3a17bf6539aae64ea7af820b8cd3d8 Mon Sep 17 00:00:00 2001 From: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com> Date: Sat, 30 Aug 2025 20:26:11 +0530 Subject: [PATCH 2/4] apply suggestions from review Co-authored-by: Sergey B Kirpichev --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 19b0d87957197a..65dcb9477ed532 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3306,7 +3306,7 @@ arbitrary binary data. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /) - This static method returns a translation table usable for bytearray or + This static method returns a translation table usable for :meth:`bytearray.translate` or :meth:`bytes.translate` that will map each character in *from* into the character at the same position in *to*; *from* and *to* must both be :term:`bytes-like objects ` and have the same length. From 506081e7b597c7ce4a1d4790fe1e574e6d4c28ed Mon Sep 17 00:00:00 2001 From: Bonu Krishna Chaitanya Date: Sun, 31 Aug 2025 21:36:49 +0530 Subject: [PATCH 3/4] wrap line to 79 characters. --- Doc/library/stdtypes.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 65dcb9477ed532..28c860284c44df 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3306,10 +3306,11 @@ arbitrary binary data. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /) - This static method returns a translation table usable for :meth:`bytearray.translate` or - :meth:`bytes.translate` that will map each character in *from* into the - character at the same position in *to*; *from* and *to* must both be - :term:`bytes-like objects ` and have the same length. + This static method returns a translation table usable for + :meth:`bytearray.translate` or :meth:`bytes.translate` that will map each + character in *from* into the character at the same position in *to*; *from* + and *to* must both be :term:`bytes-like objects ` and + have the same length. .. versionadded:: 3.1 From c29b604619069e1faa1f7300d8b0c27c279200a1 Mon Sep 17 00:00:00 2001 From: Bonu Krishna Chaitanya Date: Sun, 31 Aug 2025 21:47:24 +0530 Subject: [PATCH 4/4] remove trailing whitespaces --- Doc/library/stdtypes.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 28c860284c44df..74a132236bf26c 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3306,10 +3306,10 @@ arbitrary binary data. .. staticmethod:: bytes.maketrans(from, to, /) bytearray.maketrans(from, to, /) - This static method returns a translation table usable for - :meth:`bytearray.translate` or :meth:`bytes.translate` that will map each - character in *from* into the character at the same position in *to*; *from* - and *to* must both be :term:`bytes-like objects ` and + This static method returns a translation table usable for + :meth:`bytearray.translate` or :meth:`bytes.translate` that will map each + character in *from* into the character at the same position in *to*; *from* + and *to* must both be :term:`bytes-like objects ` and have the same length. .. versionadded:: 3.1