Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
agrover
on July 18, 2014
|
parent
|
context
|
favorite
| on:
The optional “else” in Python loops
Raymond Hettinger, one of the main Python devs, advises that the "else" in this situation should mentally be thought of as "notfound".
a3n
on July 18, 2014
|
next
[–]
I think "else" should be pronounced "then" for the for and while loops. And the meaning is "then and only then."
eddyg
on July 18, 2014
|
prev
[–]
Glad 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
agrover
on July 18, 2014
|
parent
[–]
Ah, I misremembered, "nobreak", not "notfound".
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: