How coding in Python is bad for you

MRAB python at mrabarnett.plus.com
Wed Feb 1 21:05:42 EST 2017


On 2017-02-01 23:49, Erik wrote:
> On 30/01/17 02:14, Steve D'Aprano wrote:
>> On Mon, 30 Jan 2017 10:52 am, Erik wrote:
>>> It would be even better if it was "else if not break:" to make the
>>> meaning clearer.
>>
>> break is not the only way to exit the for loop
>
> Fine - "else if not break or raise or return:", then ;) [that is not a
> serious suggestion]
>
[snip]

Both suggestions are a little long-winded. Couldn't we just abbreviate 
them to "else:"? :-)




More information about the Python-list mailing list