Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,8 @@ scope::
>>> f(1)
43

The above example uses a lambda expression to return a function. Another use
is to pass a small function as an argument::
The above example uses a lambda expression to return a function. Another use is to pass a small function as an argument. For instance, :meth:`list.sort`
takes a sorting key function *key* which can be a lambda function::

>>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]
>>> pairs.sort(key=lambda pair: pair[1])
Expand Down
Loading