Mercurial > cpython-lru_cache-weakref
diff Objects/bytesobject.c @ 66069:8154db8a1593
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
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sun, 07 Nov 2010 18:41:46 +0000 |
| parents | d31eaec883eb |
| children | f8208c33978f |
line wrap: on
line diff
--- a/Objects/bytesobject.c Sun Nov 07 15:47:36 2010 +0000 +++ b/Objects/bytesobject.c Sun Nov 07 18:41:46 2010 +0000 @@ -2289,10 +2289,10 @@ 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\
