[issue29073] bytearray.__mod__() truncates on first \x00

Serhiy Storchaka report at bugs.python.org
Mon Dec 26 05:31:23 EST 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue29073>
_______________________________________


More information about the Python-bugs-list mailing list