mirror of
https://github.com/python/cpython.git
synced 2025-09-29 11:45:57 +00:00
adjust signature
This commit is contained in:
parent
86089f0b0c
commit
e8ee03dbc6
1 changed files with 3 additions and 3 deletions
|
@ -813,7 +813,7 @@ functions based on regular expressions.
|
||||||
interpreted as in slice notation.
|
interpreted as in slice notation.
|
||||||
|
|
||||||
|
|
||||||
.. method:: str.encode([encoding[, errors]])
|
.. method:: str.encode(encoding=sys.getdefaultencoding(), errors="strict")
|
||||||
|
|
||||||
Return an encoded version of the string as a bytes object. Default encoding
|
Return an encoded version of the string as a bytes object. Default encoding
|
||||||
is the current default string encoding. *errors* may be given to set a
|
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
|
||||||
b = a.replace(b"a", b"f")
|
b = a.replace(b"a", b"f")
|
||||||
|
|
||||||
|
|
||||||
.. method:: bytes.decode([encoding[, errors]])
|
.. method:: bytes.decode(encoding=sys.getdefaultencoding(), errors="strict")
|
||||||
bytearray.decode([encoding[, errors]])
|
bytearray.decode(encoding=sys.getdefaultencoding(), errors="strict")
|
||||||
|
|
||||||
Return a string decoded from the given bytes. Default encoding is the
|
Return a string decoded from the given bytes. Default encoding is the
|
||||||
current default string encoding. *errors* may be given to set a different
|
current default string encoding. *errors* may be given to set a different
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue