Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
01b7d589
Commit
01b7d589
authored
Jul 16, 2018
by
Raymond Hettinger
Committed by
GitHub
Jul 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292)
parent
c9265c15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+7
-1
No files found.
Doc/library/stdtypes.rst
View file @
01b7d589
...
...
@@ -4220,12 +4220,18 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
.. method:: popitem()
Remove and return an arbitrary ``(key, value)`` pair from the dictionary.
Remove and return a ``(key, value)`` pair from the dictionary.
Pairs are returned in :abbr:`LIFO (last-in, first-out)` order.
:meth:`popitem` is useful to destructively iterate over a dictionary, as
often used in set algorithms. If the dictionary is empty, calling
:meth:`popitem` raises a :exc:`KeyError`.
.. versionchanged:: 3.7
LIFO order is now guaranteed. In prior versions, :meth:`popitem` would
return an arbitrary key/value pair.
.. method:: setdefault(key[, default])
If *key* is in the dictionary, return its value. If not, insert *key*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment