cpython: b607ce6c9ee6 (original) (raw)
Mercurial > cpython
changeset 86303:b607ce6c9ee6 3.3
Issue #17827: Document codecs.encode and codecs.decode [#17827]
Nick Coghlan ncoghlan@gmail.com | |
---|---|
date | Mon, 14 Oct 2013 00:22:13 +1000 |
parents | e08dea96b6e2 |
children | 32f3d6721c84 975ae00aa20f |
files | Doc/library/codecs.rst Misc/NEWS |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-)[+] [-] Doc/library/codecs.rst 19 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -22,6 +22,25 @@ manages the codec and error handling loo It defines the following functions: +.. function:: encode(obj, encoding='utf-8', errors='strict') +
- Encodes obj using the codec registered for encoding. +
- Errors may be given to set the desired error handling scheme. The
- default error handler is
strict
meaning that encoding errors raise - :exc:
ValueError
(or a more codec specific subclass, such as - :exc:
UnicodeEncodeError
). Refer to :ref:codec-base-classes
for more - information on codec error handling. +
+.. function:: decode(obj, encoding='utf-8', errors='strict') +
- Decodes obj using the codec registered for encoding. +
- Errors may be given to set the desired error handling scheme. The
- default error handler is
strict
meaning that decoding errors raise - :exc:
ValueError
(or a more codec specific subclass, such as - :exc:
UnicodeDecodeError
). Refer to :ref:codec-base-classes
for more - information on codec error handling.
.. function:: register(search_function)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -76,6 +76,9 @@ Core and Builtins
Library
-------
+- Issue #17827: Add the missing documentation for codecs.encode
and