[Python-Dev] re: for in dict (user expectation poll)

Ka-Ping Yee ping@lfw.org
Tue, 6 Feb 2001 08:59:04 -0800 (PST)


On Tue, 6 Feb 2001, Greg Wilson wrote:
> I'm basing my claim on the kind
> of errors students in my course make.  Even after being shown half-a-dozen
> examples of Python for loops, many of them write:
> 
>     for i in someSequence:
>         print someSequence[i]
> 
> in their first exercise.

Amazing (to me).  Thank you for this data point; it's news to me.

I don't know what that means we should do, though.  We can't break
the way existing loops work.

What would make for-loops easier to present, given this experience?


-- ?!ng

"There's no point in being grown up if you can't be childish sometimes."
    -- Dr. Who