[issue28374] SyntaxError: invalid token in python2.7/test/test_grammar.py
Terry J. Reedy
report at bugs.python.org
Fri Oct 7 18:41:00 EDT 2016
Terry J. Reedy added the comment:
The absence of a space is intentional. See #21642. Fix applied 2014-06-07. Hence Berker's guesses.
def test_float_exponent_tokenization(self):
# See issue 21642.
self.assertEqual(1 if 1else 0, 1)
self.assertEqual(1 if 0else 0, 0)
self.assertRaises(SyntaxError, eval, "0 if 1Else 0")
On Windows, test passes for 2.7.12 both installed and locally compiled.
This said, it is possible that there is a compilation problem on some system, especially one that does not match a buildbot. We can re-open if this is the case.
----------
nosy: +terry.reedy
status: pending -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28374>
_______________________________________
More information about the Python-bugs-list
mailing list