Explanation of list reference

Ben Finney ben+python at benfinney.id.au
Sun Feb 16 22:52:38 EST 2014


Roy Smith <roy at panix.com> writes:

>  Chris Angelico <rosuav at gmail.com> wrote:
> > Part of the trouble is that some code is (represented by) objects. A
> > function is an object, ergo it's data; a module is an object (though
> > that's different); a class is an object; but no other block of code
> > is.
>
> Lambda?

The ‘lambda’ syntax creates a function.

It doesn't create “a lambda”; there's no distinction between functions
that were created with a ‘def’ statement versus a ‘lambda’ expression.

-- 
 \          “Generally speaking, the errors in religion are dangerous; |
  `\    those in philosophy only ridiculous.” —David Hume, _A Treatise |
_o__)                                           of Human Nature_, 1739 |
Ben Finney




More information about the Python-list mailing list