This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author HVoltBb
Recipients HVoltBb, docs@python
Date 2021-05-20.23:08:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621552113.7.0.197671013428.issue44199@roundup.psfhosted.org>
In-reply-to
Content
An index error in the code example given just above https://docs.python.org/3/tutorial/controlflow.html#documentation-strings

The code now is :
pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]
pairs.sort(key=lambda pair: pair[1])
pairs

The "pair[1]" in the second line should be "pair[0]".
History
Date User Action Args
2021-05-20 23:08:33HVoltBbsetrecipients: + HVoltBb, docs@python
2021-05-20 23:08:33HVoltBbsetmessageid: <1621552113.7.0.197671013428.issue44199@roundup.psfhosted.org>
2021-05-20 23:08:33HVoltBblinkissue44199 messages
2021-05-20 23:08:33HVoltBbcreate