4 ms·
Raymond Hettinger, one of the main Python devs, advises that the "else" in this situation should mentally be thought of as "notfound".
by agrover 12y ago
Raymond Hettinger, one of the main Python devs, advises that the "else" in this situation should mentally be thought of as "notfound".
- eddyg 12y agoGlad you posted this. I came to the comments to post the same thing[1] because thinking of it as "notfound" makes remembering (and comprehending it) easier. :) [1] https://www.youtube.com/watch?v=OSGv2VnC0go#t=17m12s https://www.youtube.com/watch?v=OSGv2VnC0go#t=17m12s
- agrover 12y agoAh, I misremembered, "nobreak", not "notfound".
- a3n 12y agoI think "else" should be pronounced "then" for the for and while loops. And the meaning is "then and only then."