Serhiy Storchaka added the comment: Indeed, there is an inconsistency between bytes and bytearray in 3.5:
>>> b'a\0b' % () b'a\x00b' >>> bytearray(b'a\0b') % () bytearray(b'a') It was unintentionally fixed in issue25399. Proposed patch fixes the issue. ---------- keywords: +patch nosy: +ethan.furman, haypo, serhiy.storchaka stage: -> patch review Added file: http://bugs.python.org/file46039/bytearray_format_nul.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29073> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com