mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
Patch written by Brad Aylsworth.
This commit is contained in:
parent
ae9d193dc4
commit
ef5b4e3dc3
2 changed files with 7 additions and 4 deletions
|
@ -22,9 +22,10 @@ manages the codec and error handling lookup process.
|
|||
|
||||
It defines the following functions:
|
||||
|
||||
.. function:: encode(obj, encoding='utf-8', errors='strict')
|
||||
.. function:: encode(obj, [encoding[, errors]])
|
||||
|
||||
Encodes *obj* using the codec registered for *encoding*.
|
||||
Encodes *obj* using the codec registered for *encoding*. The default
|
||||
encoding is ``utf-8``.
|
||||
|
||||
*Errors* may be given to set the desired error handling scheme. The
|
||||
default error handler is ``strict`` meaning that encoding errors raise
|
||||
|
@ -32,9 +33,10 @@ It defines the following functions:
|
|||
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more
|
||||
information on codec error handling.
|
||||
|
||||
.. function:: decode(obj, encoding='utf-8', errors='strict')
|
||||
.. function:: decode(obj, [encoding[, errors]])
|
||||
|
||||
Decodes *obj* using the codec registered for *encoding*.
|
||||
Decodes *obj* using the codec registered for *encoding*. The default
|
||||
encoding is ``utf-8``.
|
||||
|
||||
*Errors* may be given to set the desired error handling scheme. The
|
||||
default error handler is ``strict`` meaning that decoding errors raise
|
||||
|
|
|
@ -57,6 +57,7 @@ David Ascher
|
|||
Chris AtLee
|
||||
Aymeric Augustin
|
||||
John Aycock
|
||||
Brad Aylsworth
|
||||
Donovan Baarda
|
||||
Arne Babenhauserheide
|
||||
Attila Babo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue