summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-05-14 15:08:45 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-05-14 15:08:45 (GMT)
commitef5b4e3dc3b04327514d2e1704a8c8cd822d8beb (patch)
tree971a16b95e08f942c596829e1630087b34a8b985 /Doc
parentae9d193dc467eb1135f56523caa28c0ebce1ff15 (diff)
downloadcpython-ef5b4e3dc3b04327514d2e1704a8c8cd822d8beb.zip
cpython-ef5b4e3dc3b04327514d2e1704a8c8cd822d8beb.tar.gz
cpython-ef5b4e3dc3b04327514d2e1704a8c8cd822d8beb.tar.bz2
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword support.
Patch written by Brad Aylsworth.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/codecs.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 3729dac..fb3af3b 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -22,9 +22,10 @@ manages the codec and error handling lookup process.
It defines the following functions:
-.. function:: encode(obj, encoding='utf-8', 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 ``utf-8``.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``strict`` meaning that encoding errors raise
@@ -32,9 +33,10 @@ It defines the following functions:
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more
information on codec error handling.
-.. function:: decode(obj, encoding='utf-8', 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 ``utf-8``.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``strict`` meaning that decoding errors raise