map/filter/reduce/lambda opinions and background unscientific mini-survey

Mike Meyer mwm at mired.org
Sat Jul 2 12:41:03 EDT 2005


Jamey Cribbs <jcribbs at twmi.rr.com> writes:
> Code blocks allow you to wrap up any Ruby code and pass it to a method
> and have it executed within that method.  It is more powerful than
> lambda, because you can have multiple statements in the code block and
> you can do assignment within the code block.

Just FYI, the inability to have statements - even multiple statements
- in a lambda is what people are talking about when they talk about
the limitations of lambda. It's a common thing for someone with a
background that includes a proper lambda to trip over when they first
start programming in Python. It's not that uncommon for newcommers to
trip over it with "print".

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list