diff -r 4a2afda8f187 Doc/library/codecs.rst --- a/Doc/library/codecs.rst Sat Nov 02 18:50:53 2013 +0200 +++ b/Doc/library/codecs.rst Mon Nov 04 19:27:53 2013 +1000 @@ -23,6 +23,25 @@ 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) diff -r 4a2afda8f187 Misc/NEWS --- a/Misc/NEWS Sat Nov 02 18:50:53 2013 +0200 +++ b/Misc/NEWS Mon Nov 04 19:27:53 2013 +1000 @@ -12,6 +12,9 @@ Library ------- +- Issue #17827: Add the missing documentation for ``codecs.encode`` and + ``codecs.decode``. + - Issue #19286: Directories in ``package_data`` are no longer added to the filelist, preventing failure outlined in the ticket.