Message255486
How lovely ;-)
>>> compile(chr(0), '', 'eval') # 2.7, chr(0) is byte
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
compile(chr(0), '', 'eval')
TypeError: compile() expected string without null bytes
>>> compile(chr(0), '', 'eval') # 3.4, chr(0) is unichar
Traceback (most recent call last):
File "<pyshell#25>", line 1, in <module>
compile(chr(0), '', 'eval')
ValueError: source code string cannot contain null bytes
>>> compile(bytes(1), '', 'eval') # == 2.7 chr(0)
Traceback (most recent call last):
File "<pyshell#27>", line 1, in <module>
compile(bytes(1), '', 'eval')
ValueError: source code string cannot contain null bytes
I almost think the long tuple should be replaced by Exception. |
|
Date |
User |
Action |
Args |
2015-11-27 21:09:37 | terry.reedy | set | recipients:
+ terry.reedy, ppperry |
2015-11-27 21:09:37 | terry.reedy | set | messageid: <1448658577.58.0.89826086354.issue25733@psf.upfronthosting.co.za> |
2015-11-27 21:09:37 | terry.reedy | link | issue25733 messages |
2015-11-27 21:09:37 | terry.reedy | create | |
|