New submission from Armin Rigo:
This is probably the smallest example of a .py file that behaves differently in
CPython vs PyPy, and for once, I'd argue that the CPython behavior is
unexpected:
# make the file:
>>> open('x.py', 'wb').write('#\x00\na')
# run it:
python x.py
Expected: either some SyntaxError, or "NameError: global name 'a' is not
defined". Got: nothing. It seems that CPython completely ignores the line
that is immediately after a line with a '#' and a following '\x00'.
----------
components: Interpreter Core
messages: 207232
nosy: arigo
priority: low
severity: normal
status: open
title: NUL bytes in commented lines
type: compile error
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20115>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com