[docs] [issue30588] Missing documentation for codecs.escape_decode
Serhiy Storchaka
report at bugs.python.org
Sun Jul 14 10:55:14 EDT 2019
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Reading the stackoverflow questions, I am not sure that this function would be useful for the author of the question. He just needs to remove b'\\000', this is only what we know. There are many ways to do it, and after using codecs.escape_decode() you will need to remove b'\000'.
If you want to add a feature similar to the "string-escape" codec in Python 3, it is better to provide it officially as a new codec "bytes-escape" (functions like codecs.utf_16_le_decode() are internal). But we should discuss its behavior taking to account the difference between string literals in Python 2 and bytes literals in Python 3. For example how to treat non-escaped non-ascii bytes (they where acceptable in Python 2, but not in Python 3).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30588>
_______________________________________
More information about the docs
mailing list