]> granicus.if.org Git - python/commitdiff
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 14 May 2014 15:07:08 +0000 (17:07 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 14 May 2014 15:07:08 +0000 (17:07 +0200)
Patch written by Brad Aylsworth.

Doc/library/codecs.rst
Misc/ACKS

index f0e179b65b96d613e6f935c2ad1176a26c7cb956..05c715623bf87b6f74d1d2e77b555a6d375fdb46 100644 (file)
@@ -23,24 +23,26 @@ manages the codec and error handling lookup process.
 
 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.
index c8c388079701e5fbd9ad3140fddba68af78b1f90..67f33f22d109dd19d541a61129b35165030c6c3d 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -56,6 +56,7 @@ David Ascher
 Chris AtLee
 Aymeric Augustin
 John Aycock
+Brad Aylsworth
 Donovan Baarda
 Arne Babenhauserheide
 Attila Babo