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

Skip to content

Commit ef5b4e3

Browse files
committed
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
Patch written by Brad Aylsworth.
1 parent ae9d193 commit ef5b4e3

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Doc/library/codecs.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,21 @@ manages the codec and error handling lookup process.
2222

2323
It defines the following functions:
2424

25-
.. function:: encode(obj, encoding='utf-8', errors='strict')
25+
.. function:: encode(obj, [encoding[, errors]])
2626

27-
Encodes *obj* using the codec registered for *encoding*.
27+
Encodes *obj* using the codec registered for *encoding*. The default
28+
encoding is ``utf-8``.
2829

2930
*Errors* may be given to set the desired error handling scheme. The
3031
default error handler is ``strict`` meaning that encoding errors raise
3132
:exc:`ValueError` (or a more codec specific subclass, such as
3233
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more
3334
information on codec error handling.
3435

35-
.. function:: decode(obj, encoding='utf-8', errors='strict')
36+
.. function:: decode(obj, [encoding[, errors]])
3637

37-
Decodes *obj* using the codec registered for *encoding*.
38+
Decodes *obj* using the codec registered for *encoding*. The default
39+
encoding is ``utf-8``.
3840

3941
*Errors* may be given to set the desired error handling scheme. The
4042
default error handler is ``strict`` meaning that decoding errors raise

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ David Ascher
5757
Chris AtLee
5858
Aymeric Augustin
5959
John Aycock
60+
Brad Aylsworth
6061
Donovan Baarda
6162
Arne Babenhauserheide
6263
Attila Babo

0 commit comments

Comments
 (0)