On Wed, Jul 29, 2020 at 02:51 Mathew Elman <[email protected]> wrote:

>
> .
>
>> If it *is* useful, it occurs to me that (1) this looks a lot like the
>> try ... except ... pattern, and (2) breaks are generally perceived as
>> exceptional exits from a loop.  Instead of "if break [LABEL]", "except
>> [LABEL]" might work, although the semantic difference between labels
>> and exceptions might get a ton of pushback.
>
> ...
>>
> Steve
>>
>
> In the related thread I suggested using `except`, but it was largely
> ignored.
>
>
> *If* you want tou propose clearer syntax for this, please extend the loop
>> syntax, not the ‘if’ syntax. So, ‘case ... zero’ makes more sense than ‘if
>> [not] break’.
>>
>
>> —Guido
>>
>
> So I understand, does this mean that any extended syntax for this should
> be *totally* new and not draw on existing constructs such as `try-except`
> or `if-else`?
> Or just that the additional clarity should come from  extending the loop
> rather than the implicit `if`?
>

Actually, given that ‘else:’ already confuses people I very much doubt that
any other new construct will be acceptable. It is totally five not to
“solve” this problem at all — all use cases can be done by adding flag
variables explicitly manipulated by the user’s code.

>
> Mathew
>
>
> Notice:
> This email is confidential and may contain copyright material of members
> of the Ocado Group. Opinions and views expressed in this message may not
> necessarily reflect the opinions and views of the members of the Ocado
> Group.
>
> If you are not the intended recipient, please notify us immediately and
> delete all copies of this message. Please note that it is your
> responsibility to scan this message for viruses.
>
> References to the "Ocado Group" are to Ocado Group plc (registered in
> England and Wales with number 7098618) and its subsidiary undertakings (as
> that expression is defined in the Companies Act 2006) from time to time.
> The registered office of Ocado Group plc is Buildings One & Two, Trident
> Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.
> _______________________________________________
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/TVTCXQN5KDMQUCFQ7AJES2RISPFD6OTL/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-- 
--Guido (mobile)
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/Y7PMBCC7EE7IWEFXSJN4ZNKFT3DUMSS4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to