On 2017-07-26 23:55, Koos Zevenhoven wrote:
On Mon, Jul 24, 2017 at 7:14 PM, Steven D'Aprano <st...@pearwood.info
<mailto:st...@pearwood.info>>wrote:
Hello Kiuhnm, and welcome.
On Mon, Jul 24, 2017 at 05:35:03PM +0200, Kiuhnm via Python-Dev wrote:
> Hello,
>
> I think that the expression "for...else" or "while...else" is completely
> counter-intuitive.
You may be right -- this has been discussed many, many times before. In
my personal opinion, the best (and only accurate!) phrase would have
been:
for item in sequence:
# block
then:
# block
IMO,
for item in sequence:
# block
nobreak: # or perhaps `if not break:`
# block
would be clearer (if the syntax is necessary at all).
[snip]
You couldn't have "if not break:" because that would look like the start
of an 'if' statement.
"nobreak" would introduce a new keyword, but "not break" wouldn't.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com