Hacker News new | past | comments | ask | show | jobs | submit login

Raymond Hettinger has suggested that instead of `else:` the keyword should have been called `nobreak:` which conveys intentions better.



What about using "finally," which if IIRC is already a thing in Python and encapsulates this idea pretty neatly?


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).


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.


or something like "then"?


Or "unbroken", even... ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: