This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Nick Huber
Recipients Nick Huber
Date 2017-03-03.19:05:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za>
In-reply-to
Content
Python 3.6.0 (default, Mar  3 2017, 00:15:36) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b'a\x00%i' % 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during bytes formatting
>>> b'a%i' % 1
b'a1'
>>> b'a%i\x00' % 1
b'a1\x00'


On python3.5, this works in all the scenarios

Python 3.5.1 (default, Jan 14 2017, 03:58:20) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b'a\x00%i' % 1
b'a\x001'
>>> b'a%i' % 1
b'a1'
>>> b'a%i\x00' % 1
b'a1\x00'
History
Date User Action Args
2017-03-03 19:05:28Nick Hubersetrecipients: + Nick Huber
2017-03-03 19:05:28Nick Hubersetmessageid: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za>
2017-03-03 19:05:28Nick Huberlinkissue29714 messages
2017-03-03 19:05:27Nick Hubercreate