> On 11/07/2020 06:22, Олег Комлев wrote:
> > ELSE-clause in FOR and WHILE has unclear syntax. I suggest new clause 
> > instead:
> 
> if COND:
>   ...
> [elif COND:
>   ...]
> [else:
>   ...]
> 
> This IF-clause like must be immediately after FOR- or WHILE-cycle (only 
> comment allowed between). It looks like a regular IF, but COND is 
> special.

On Sun, Jul 12, 2020, at 00:16, Rob Cliffe via Python-ideas wrote:
>  Something to consider: Would it be legal to mix these CONDs with other 
> conditions in the 'elif' chain? E.g.
>  if break:
>  ...
>  elif x > 0:
>  ...
>  elif finally:


What if "instead of a special kind of if clause that can only be placed after a 
loop", we simply defined these three special expressions [usable in any if/elif 
statement] to reference special boolean flags that are set after exiting any 
loop?
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Z76AKHQUB2DZWBB3CQGHPIHQ7WUW5BYV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to