mirror of
https://github.com/python/cpython.git
synced 2026-05-21 11:54:48 -04:00
pop(): An arbitrary element is removed, not a random element.
This commit is contained in:
+2
-1
@@ -143,7 +143,8 @@ but not found in \class{ImmutableSet}:
|
||||
{Removes element \var{x} from set \var{s} like \var{s}.remove(\var{x})
|
||||
but does not raise a KeyError if \var{x} is not in \var{s}}
|
||||
\lineii{\var{s}.pop()}
|
||||
{Remove and return a randomly-chosen element from \var{s}}
|
||||
{Remove and return an element from \var{s}; no guarantee is
|
||||
made about which element is removed}
|
||||
\lineii{\var{s}.update(\var{t})}
|
||||
{Add elements from \var{t} to set \var{s}}
|
||||
\lineii{\var{s}.clear()}
|
||||
|
||||
Reference in New Issue
Block a user