PEP 312 - Making lambdas implicit worries me, surely it's just the name 'lambda' that is bad...
Dave Brueck
dave at pythonapocrypha.com
Mon Mar 3 12:55:20 EST 2003
On Mon, 3 Mar 2003, Alexander Schmolck wrote:
> Alex Martelli <aleax at aleax.it> writes:
>
> > Jack Diederich wrote:
> > ...
> > > I'm a big functional programming fan, but most python user's aren't.
> > ...
> > > filter() and only two dozen [very simple!] list comprehensions.
> >
> > So I guess your "functional programming" enthusiasm doesn't come
> > from Haskell
>
> I don't think that follows. Python's list comprehensions are different -- they
> pollute the namespace.
Oh, c'mon. This is a frequently cited yet overstated wart. Yeah,
technically it's a problem, but much more a theoretical than practical one
- in practice the only time it causes problems is when you're doing
something questionable anyway, like reusing a variable without
initializing it to some known value.
It's a nit rather than a real divergence from Haskell's list comps.
-Dave
More information about the Python-list
mailing list