Article of interest: Python pros/cons for the enterprise

Paul Rubin http
Sat Feb 23 22:18:32 EST 2008


Jeff Schwab <jeff at schwabcenter.com> writes:
> So to use the Perl example: If you want to sort a list using some
> arbitrary snippet of code as the comparison function, you can write:
>      sort { code to compare $a and $b } @elements

Yes, you can do that in Python, using a lambda expression, a named
function, or whatever.  

> What language do you have in mind, in which lambda is more basic than
> named definitions?  Are you coming from a functional language
> background?

All languages that I know of with lambda, treat it as more basic than
named definitions, e.g. the Lisp family (not sure if those count as
functional languages) in addition to functional languages like Haskell.



More information about the Python-list mailing list