Message290724
Hello,
In Python 3.6.0, % formatting fails to find formatting code after a null byte in bytes type.
Example:
>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not all arguments converted during bytes formatting
In contrast, the exact same code works as expected in Python 3.5:
>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
b'hello_\x00world'
I used Python 3.6.0 that I installed using pyenv 1.0.8 on Kubuntu 16.04 x86_64. |
|
Date |
User |
Action |
Args |
2017-03-28 14:37:41 | boramalper | set | recipients:
+ boramalper |
2017-03-28 14:37:41 | boramalper | set | messageid: <1490711861.33.0.140733331075.issue29934@psf.upfronthosting.co.za> |
2017-03-28 14:37:41 | boramalper | link | issue29934 messages |
2017-03-28 14:37:41 | boramalper | create | |
|