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 Jean-Michel.Fauth
Recipients Jean-Michel.Fauth
Date 2011-12-16.07:27:20
SpamBayes Score 1.659929e-07
Marked as misclassified No
Message-id <1324020441.52.0.721783432862.issue13610@psf.upfronthosting.co.za>
In-reply-to
Content
Can this be fixed? As far as I can remember (ver. 1.5.6),
it has always existed. Python does not crash, I find it
inelegant. Should it not be a SyntaxError?

Side effect. Searching for keywords, (eg. with re, "\b") may
practically always implies to handle this case separately.

Python all versions.

>>> 1and 0
0
>>> 1or 0
1
>>> 9if True else 22
9
>>> 0.1234if True else 22
0.1234
>>> [999for i in range(3)]
[999, 999, 999]
History
Date User Action Args
2011-12-16 07:27:21Jean-Michel.Fauthsetrecipients: + Jean-Michel.Fauth
2011-12-16 07:27:21Jean-Michel.Fauthsetmessageid: <1324020441.52.0.721783432862.issue13610@psf.upfronthosting.co.za>
2011-12-16 07:27:20Jean-Michel.Fauthlinkissue13610 messages
2011-12-16 07:27:20Jean-Michel.Fauthcreate