[Python-checkins] cpython (2.7): Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword
victor.stinner
python-checkins at python.org
Wed May 14 17:10:01 CEST 2014
http://hg.python.org/cpython/rev/cc5e3b93c35a
changeset: 90697:cc5e3b93c35a
branch: 2.7
parent: 90694:5ef9a2c711f5
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed May 14 17:07:08 2014 +0200
summary:
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
Patch written by Brad Aylsworth.
files:
Doc/library/codecs.rst | 14 ++++++++------
Misc/ACKS | 1 +
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -23,24 +23,26 @@
It defines the following functions:
-.. function:: encode(obj, encoding='ascii', errors='strict')
+.. function:: encode(obj, [encoding[, errors]])
- Encodes *obj* using the codec registered for *encoding*.
+ Encodes *obj* using the codec registered for *encoding*. The default
+ encoding is ``'ascii'``.
*Errors* may be given to set the desired error handling scheme. The
- default error handler is ``strict`` meaning that encoding errors raise
+ 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')
+.. function:: decode(obj, [encoding[, errors]])
- Decodes *obj* using the codec registered for *encoding*.
+ Decodes *obj* using the codec registered for *encoding*. The default
+ encoding is ``'ascii'``.
*Errors* may be given to set the desired error handling scheme. The
- default error handler is ``strict`` meaning that decoding errors raise
+ 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.
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -56,6 +56,7 @@
Chris AtLee
Aymeric Augustin
John Aycock
+Brad Aylsworth
Donovan Baarda
Arne Babenhauserheide
Attila Babo
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list