unintuitive for-loop behavior
Rustom Mody
rustompmody at gmail.com
Fri Sep 30 01:06:03 EDT 2016
On Friday, September 30, 2016 at 10:23:31 AM UTC+5:30, Gregory Ewing wrote:
> namenobodywants wrote:
> > can anyone help to reconcile me to this semantics?
>
> Not really. Most people agree that it's not desirable
> behaviour, but we've ended up here due to a convoluted
> history, and there doesn't seem to be a good way to
> fix it without breaking a lot of existing code.
Thanks for an unusually helpful answer.
In my experience telling a beginner:
«This» is a misfeature/gotcha
And «this» is its workaround
greatly shortens the learning curve as compared to long-winded
justificatory explanations
More information about the Python-list
mailing list