On 14/12/13 04:19, Steven D'Aprano wrote:

Lambda is just syntactic sugar for a function. It is exactly the same as
a def function, except with two limitations:

- there is no name, or to be precise, the name of all lambda functions
is the same, "<lambda>";

Sorry, I don't think that is precise. lambda is not the name of the function. You can't use lambda to access the function(s) or treat it like any other kind of name in Python. In fact if you try to use it as a name you'll likely get a syntax error.

lambda is the key word that defines the function. But its no more
the name of the function than def is.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to