Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ee395b7e
Commit
ee395b7e
authored
Nov 04, 2013
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close #17827: Document codecs.encode & codecs.decode
parent
336c6d75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
Doc/library/codecs.rst
Doc/library/codecs.rst
+23
-0
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Doc/library/codecs.rst
View file @
ee395b7e
...
...
@@ -23,6 +23,29 @@ manages the codec and error handling lookup process.
It defines the following functions:
.. function:: encode(obj, encoding='ascii', 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.
.. versionadded:: 2.4
.. function:: decode(obj, encoding='ascii', 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.
.. versionadded:: 2.4
.. function:: register(search_function)
...
...
Misc/NEWS
View file @
ee395b7e
...
...
@@ -12,9 +12,13 @@ Core and Builtins
Library
-------
- Issue #17827: Add the missing documentation for ``codecs.encode`` and
``codecs.decode``.
- Issue #6157: Fixed Tkinter.Text.debug(). Original patch by Guilherme Polo.
- Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
integers instead of a string. Based on patch by Guilherme Polo.
- Issue #19286: Directories in ``package_data`` are no longer added to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment