File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,25 @@ manages the codec and error handling lookup process.
2222
2323It defines the following functions:
2424
25+ .. function :: encode(obj, encoding='utf-8', errors='strict')
26+
27+ Encodes *obj * using the codec registered for *encoding *.
28+
29+ *Errors * may be given to set the desired error handling scheme. The
30+ default error handler is ``strict `` meaning that encoding errors raise
31+ :exc: `ValueError ` (or a more codec specific subclass, such as
32+ :exc: `UnicodeEncodeError `). Refer to :ref: `codec-base-classes ` for more
33+ information on codec error handling.
34+
35+ .. function :: decode(obj, encoding='utf-8', errors='strict')
36+
37+ Decodes *obj * using the codec registered for *encoding *.
38+
39+ *Errors * may be given to set the desired error handling scheme. The
40+ default error handler is ``strict `` meaning that decoding errors raise
41+ :exc: `ValueError ` (or a more codec specific subclass, such as
42+ :exc: `UnicodeDecodeError `). Refer to :ref: `codec-base-classes ` for more
43+ information on codec error handling.
2544
2645.. function :: register(search_function)
2746
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ Core and Builtins
7676Library
7777-------
7878
79+ - Issue #17827: Add the missing documentation for ``codecs.encode`` and
80+ ``codecs.decode``.
81+
7982- Issue #18458: Prevent crashes with newer versions of libedit. Its readline
8083 emulation has changed from 0-based indexing to 1-based like gnu readline.
8184 Original patch by Ronald Oussoren.
You can’t perform that action at this time.
0 commit comments