News for hackers. Stuff that matters.
Re:The optional “else” in Python loops by avn2109 on Thursday July 17, 2014 @11:58PM (#8051593)
What about using "finally," which if IIRC is already a thing in Python and encapsulates this idea pretty neatly?
Re:The optional “else” in Python loops by dbarlett on Friday July 18, 2014 @12:05AM (#8051607)
finally blocks are always executed; this kind of else block is only executed if the for block exited normally (i.e. did not throw an exception).
Re:The optional “else” in Python loops by aperture on Friday July 18, 2014 @01:11AM (#8051765)
How about a keyword such as "after"? I feel like that could have extensible potential in other areas of the language, and the name makes a little sense logically speaking.
Re:The optional “else” in Python loops by gingerrr on Friday July 18, 2014 @04:40AM (#8052167)
or something like "then"?