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

Skip to content

Commit e8ee03d

Browse files
committed
adjust signature
1 parent 86089f0 commit e8ee03d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ functions based on regular expressions.
813813
interpreted as in slice notation.
814814

815815

816-
.. method:: str.encode([encoding[, errors]])
816+
.. method:: str.encode(encoding=sys.getdefaultencoding(), errors="strict")
817817

818818
Return an encoded version of the string as a bytes object. Default encoding
819819
is the current default string encoding. *errors* may be given to set a
@@ -1529,8 +1529,8 @@ Wherever one of these methods needs to interpret the bytes as characters
15291529
b = a.replace(b"a", b"f")
15301530

15311531

1532-
.. method:: bytes.decode([encoding[, errors]])
1533-
bytearray.decode([encoding[, errors]])
1532+
.. method:: bytes.decode(encoding=sys.getdefaultencoding(), errors="strict")
1533+
bytearray.decode(encoding=sys.getdefaultencoding(), errors="strict")
15341534

15351535
Return a string decoded from the given bytes. Default encoding is the
15361536
current default string encoding. *errors* may be given to set a different

0 commit comments

Comments
 (0)