Terry Reedy <tjre...@udel.edu> writes:

> On 8/10/2017 10:28 AM, Steve D'Aprano wrote:
>> Every few years, the following syntax comes up for discussion, with some 
>> people
>> saying it isn't obvious what it would do, and others disagreeing and saying
>> that it is obvious. So I thought I'd do an informal survey.
>>
>> What would you expect this syntax to return?
>>
>> [x + 1 for x in (0, 1, 2, 999, 3, 4) while x < 5]
>
> I expect it to continue to raise SyntaxError as I would be flabbergasted
> if something so awful were to be accepted into Python.

Correct:
    SyntaxError: invalid syntax

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to