Author terry.reedy
Recipients docs@python, terry.reedy
Date 2013-08-03.20:42:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za>
In-reply-to
Content
[0. On mailing lists, 'lambda expression' is used rather than 'lambda form'. Docs use both. Consistency across docs is a broader issue than this one. So leave title alone for this one.]

1. (first sentence) "By popular demand, a few features commonly found in functional programming languages like Lisp have been added to Python." (in early Python 1!) I think this should just be deleted. See 4. below as a replacement.

2. " With the lambda keyword, small anonymous functions can be created."
Change to
"Small anonymous functions can be created with the lambda keyword."

3. change "Here’s a function that returns" to "This function returns"

3.5 add a sentence about the different between def and lambda (the name attribute.

4. Add sentences about the purposes of lambda. Add an example that illustrates passing functions. 

>>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]
>>> pairs.sort(key=lambda pair: pair[1])
>>> pairs
[(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')]
History
Date User Action Args
2013-08-03 20:42:06terry.reedysetrecipients: + terry.reedy, docs@python
2013-08-03 20:42:06terry.reedysetmessageid: <1375562526.59.0.207872880438.issue18646@psf.upfronthosting.co.za>
2013-08-03 20:42:06terry.reedylinkissue18646 messages
2013-08-03 20:42:06terry.reedycreate