8000 [3.11] gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (GH-114681) by miss-islington · Pull Request #114842 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (GH-114681) #114842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2024
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
7 changes: 3 additions & 4 deletions Doc/tutorial/datastructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 4FE2 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()
Expand Down
0