On 2016-09-13, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Tue, Sep 13, 2016 at 2:57 PM, <rgrigo...@gmail.com> wrote: >> It would help newbies and prevent confusion. > > Ada uses "for". [a dozen or so other langages] > Swift uses "for". > > Why do you think it's confusing that Python uses the same keyword in > its foreach loops that all the above languages do? What mistake is > this causing newbies to make?
One might guess that the OP is coming from PHP where there are separate "for" and "foreach" looping constructs, and Python's "for" is analogous to PHP's "foreach". That said, I despise PHP so thoroughly that "because PHP does it" is, to me, a pretty strong argument for _not_ doing something. Even trying to ignore my bias agains PHP, I can't see that Python's calling it "for" instead of "foreach" is going to confuse anybody with a PHP background... -- Grant Edwards grant.b.edwards Yow! I have accepted at Provolone into my life! gmail.com -- https://mail.python.org/mailman/listinfo/python-list