4 ms·
Raymond Hettinger has suggested that instead of `else:` the keyword should have been called `nobreak:` which conveys intentions better.
by wting 12y ago
Raymond Hettinger has suggested that instead of `else:` the keyword should have been called `nobreak:` which conveys intentions better.
- avn2109 12y agoWhat about using "finally," which if IIRC is already a thing in Python and encapsulates this idea pretty neatly?
- dbarlett 12y agofinally 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).
- BerislavLopac 12y agoOr "unbroken", even... ;-)