Author serhiy.storchaka
Recipients asvetlov, carlbordum, docs@python, gregory.p.smith, mdartiailh, njs, paulehoffman, serhiy.storchaka
Date 2019-07-14.14:55:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563116114.73.0.602236337626.issue30588@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2019-07-14 14:55:14serhiy.storchakasetrecipients: + serhiy.storchaka, gregory.p.smith, njs, asvetlov, docs@python, paulehoffman, mdartiailh, carlbordum
2019-07-14 14:55:14serhiy.storchakasetmessageid: <1563116114.73.0.602236337626.issue30588@roundup.psfhosted.org>
2019-07-14 14:55:14serhiy.storchakalinkissue30588 messages
2019-07-14 14:55:14serhiy.storchakacreate