Serhiy Storchaka added the comment:

Indeed. The only difference is that PyUnicode_AsDecodedUnicode fails for most 
encodings (except rot13), but PyUnicode_AsDecodedObject just crashes in debug 
build. It seems to me that these functions (as well as 
PyUnicode_AsEncodedUnicode) shouldn't exist it Python 3. None of these 
functions are documented. PyUnicode_AsDecodedObject emits Py3k warning in 2.7. 
PyUnicode_AsDecodedUnicode and PyUnicode_AsEncodedUnicode were added in Python 
3 (2284fa89ab08), and the purpose of this is not clear to me. They work only 
with rot13, but general PyCodec_Decode and PyCodec_Encode can be used instead. 
Could you please explain Marc-André?

nosy: +benjamin.peterson, ezio.melotti, ncoghlan, serhiy.storchaka

Python tracker <>
Python-bugs-list mailing list

Reply via email to