Inspiration and influence of the else clause of loop statements in Python?
Posted
by Aristide
on Stack Overflow
See other posts from Stack Overflow
or by Aristide
Published on 2010-05-27T20:06:03Z
Indexed on
2010/05/27
20:11 UTC
Read the original article
Hit count: 201
Python offers an optional else
clause in loop statements, which is executed if and only if the loop is not terminated by a break
. For an interesting discussion about this neglected commodity, see this question. Here, I just wanted to know:
- if the very concept of this loop-else construct originates from another language (either theoretical or actually implemented),
- conversely, if it was taken up in any newer language.
May be I should ask the former to Guido, but he surely is a too busy guy for such a futile inquiry. ;-)
© Stack Overflow or respective owner