Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue30588>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to