for loop possible enhancement
Bernhard Herzog
herzog at online.de
Sat Sep 23 06:57:40 EDT 2000
"Andrew Dalke" <dalke at acm.org> writes:
> 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 :)
The main problem if this particular version is that it's already valid
Python:
>>> L1 = [1,2,3]
>>> L2 = [5,6,7]
>>> b = 1
>>> for a in L1, b in L2:
.. print a
..
[1, 2, 3]
0
>>>
--
Bernhard Herzog | Sketch, a drawing program for Unix
herzog at online.de | http://sketch.sourceforge.net/
More information about the Python-list
mailing list