diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-11-07 18:41:46 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-11-07 18:41:46 +0000 |
commit | e14e2122211081fe7e71871f77f70a0cb105dbfd (patch) | |
tree | 78d0c6b8142969b4c7cd0e8a8dce1e73ec276fb7 /Objects/bytearrayobject.c | |
parent | 64bc3b28a321b6026488f689fb125f31766d9730 (diff) | |
download | cpython-git-e14e2122211081fe7e71871f77f70a0cb105dbfd.tar.gz |
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/bytearrayobject.c')
-rw-r--r-- | Objects/bytearrayobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 283102ae6f..1a50ce3101 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -2465,10 +2465,10 @@ bytearray_rstrip(PyByteArrayObject *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 registered with codecs.register_error that is\n\ |