functional programming with map()

Just van Rossum just at xs4all.nl
Mon Mar 4 02:54:13 EST 2002


In article <a5v1bk$92n$1 at bob.news.rcn.net>,
 "Raymond Hettinger" <python at rcn.com> wrote:

> "Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
> news:3C7AFA8B.47A23F10 at cosc.canterbury.ac.nz...
>
> > Well, that's more of an "accidental" side effect.
> > Ideally, Guido would use his time machine to go back
> > and make for-loop control variables local to the
> > loop, so that the same could then be done for LCs.
> 
> Actually, Guido would not use the time machine.
> He assures me that exposing the looping variable was
> done on purpose and that the alternative was considered
> and dismissed.  The rationale for exposing the loop
> variable is to make the list comprehension perform
> identically to its for-loop equivalent.

I think Greg's talking about the loop variable(s) in the _traditional_ 
for loop.

Just



More information about the Python-list mailing list