Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
I think you have missed something important here: >>> data = b'foo\bar' >>> len(data) 6 >>> print(data) b'foo\x08ar' If you want bytes including a backslash followed by a b, you need to use raw bytes rb'foo\bar' or escape the backslash. Also Python 3.8 is in feature-freeze so the earliest this new feature could be added to the language is now 3.11. ---------- nosy: +steven.daprano type: behavior -> enhancement versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com