https://github.com/python/cpython/commit/a9c2801d49de545f6a5bfee46969dc9e20261461 commit: a9c2801d49de545f6a5bfee46969dc9e20261461 branch: 3.11 author: Miss Islington (bot) <[email protected]> committer: terryjreedy <[email protected]> date: 2024-02-01T03:53:15Z summary:
[3.11] gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (GH-114681) (#114842) Remove redundant explanation of optional argument. (cherry picked from commit 57c3e775df5a5ca0982adf15010ed80a158b1b80) Co-authored-by: srinivasan <[email protected]> files: M Doc/tutorial/datastructures.rst diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 87614d082a1d4e..de2827461e2f24 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -48,10 +48,9 @@ objects: :noindex: Remove the item at the given position in the list, and return it. If no index - is specified, ``a.pop()`` removes and returns the last item in the list. (The - square brackets around the *i* in the method signature denote that the parameter - is optional, not that you should type square brackets at that position. You - will see this notation frequently in the Python Library Reference.) + is specified, ``a.pop()`` removes and returns the last item in the list. + It raises an :exc:`IndexError` if the list is empty or the index is + outside the list range. .. method:: list.clear() _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
