mirror of https://github.com/python/cpython
2d9204199f
and introduces a new method .decode(). The major change is that strg.encode() will no longer try to convert Unicode returns from the codec into a string, but instead pass along the Unicode object as-is. The same is now true for all other codec return types. The underlying C APIs were changed accordingly. Note that even though this does have the potential of breaking existing code, the chances are low since conversion from Unicode previously took place using the default encoding which is normally set to ASCII rendering this auto-conversion mechanism useless for most Unicode encodings. The good news is that you can now use .encode() and .decode() with much greater ease and that the door was opened for better accessibility of the builtin codecs. As demonstration of the new feature, the patch includes a few new codecs which allow string to string encoding and decoding (rot13, hex, zip, uu, base64). Written by Marc-Andre Lemburg. Copyright assigned to the PSF. |
||
---|---|---|
.. | ||
.cvsignore | ||
abstract.c | ||
bufferobject.c | ||
cellobject.c | ||
classobject.c | ||
cobject.c | ||
complexobject.c | ||
dictobject.c | ||
fileobject.c | ||
floatobject.c | ||
frameobject.c | ||
funcobject.c | ||
intobject.c | ||
iterobject.c | ||
listobject.c | ||
longobject.c | ||
methodobject.c | ||
moduleobject.c | ||
object.c | ||
obmalloc.c | ||
rangeobject.c | ||
sliceobject.c | ||
stringobject.c | ||
tupleobject.c | ||
typeobject.c | ||
unicodectype.c | ||
unicodeobject.c | ||
unicodetype_db.h | ||
xxobject.c |