Skip to content
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,8 @@ scope::
43

The above example uses a lambda expression to return a function. Another use
is to pass a small function as an argument::
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