summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-11-07 18:41:46 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-11-07 18:41:46 (GMT)
commite14e2122211081fe7e71871f77f70a0cb105dbfd (patch)
tree78d0c6b8142969b4c7cd0e8a8dce1e73ec276fb7 /Objects/bytesobject.c
parent64bc3b28a321b6026488f689fb125f31766d9730 (diff)
downloadcpython-e14e2122211081fe7e71871f77f70a0cb105dbfd.zip
cpython-e14e2122211081fe7e71871f77f70a0cb105dbfd.tar.gz
cpython-e14e2122211081fe7e71871f77f70a0cb105dbfd.tar.bz2
Fix encode/decode method doc of str, bytes, bytearray types
* Specify the default encoding: write 'utf-8' instead of sys.getdefaultencoding(), because the default encoding is now constant * Specify the default errors value
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 382e911..b8fa8ee 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2289,10 +2289,10 @@ bytes_endswith(PyBytesObject *self, PyObject *args)
PyDoc_STRVAR(decode__doc__,
-"B.decode([encoding[, errors]]) -> str\n\
+"B.decode([encoding='utf-8'[, errors='strict']]) -> str\n\
\n\
-Decode B using the codec registered for encoding. encoding defaults\n\
-to the default encoding. errors may be given to set a different error\n\
+Decode B using the codec registered for encoding. Default encoding\n\
+is 'utf-8'. errors may be given to set a different error\n\
handling scheme. Default is 'strict' meaning that encoding errors raise\n\
a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n\
as well as any other name registerd with codecs.register_error that is\n\