for loop possible enhancement

Andrew Dalke dalke at acm.org
Fri Sep 22 22:54:42 EDT 2000


bob van der Poel wrote:
> I think that as a writer in the pep suggested, that
>
> for a in L1, b in L2:
>
>would be much nicer. But, if the python gods can't do it that way, guess
>zip() will have to do.

I believe one of the points against it was based on user testing.
I know there was testing since I answered a questionnaire :)

I hadn't been following the PEP discussion, so I was relatively
unbiased.  When I say that construct, I thought it was supposed to be
an abbreviated way to say:

for a in L1:
    for b in L2:
        ...

As I recall, enough other people had the same interpretation that it
was decided that the construct was too confusing.  Ahh, here are the
results.

http://www.deja.com/=vz/[ST_rn=ps]/getdoc.xp?AN=652637259&fmt=text

The questionnaire is at:
http://www.deja.com/=vz/[ST_rn=ps]/getdoc.xp?AN=648552485&fmt=text

See also the test on which the questionnaire was based:
http://www.python.org/pipermail/python-dev/2000-July/012810.html

                    Andrew
                    dalke at acm.org





More information about the Python-list mailing list