mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Multi-arg form for set.difference() and set.difference_update().
This commit is contained in:
parent
9d53457e59
commit
4267be6478
4 changed files with 66 additions and 21 deletions
|
@ -1583,10 +1583,13 @@ The constructors for both classes work the same:
|
|||
.. versionchanged:: 2.6
|
||||
Accepts multiple input iterables.
|
||||
|
||||
.. method:: difference(other)
|
||||
set - other
|
||||
.. method:: difference(other, ...)
|
||||
set - other - ...
|
||||
|
||||
Return a new set with elements in the set that are not in *other*.
|
||||
Return a new set with elements in the set that are not in the others.
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Accepts multiple input iterables.
|
||||
|
||||
.. method:: symmetric_difference(other)
|
||||
set ^ other
|
||||
|
@ -1650,10 +1653,13 @@ The constructors for both classes work the same:
|
|||
.. versionchanged:: 2.6
|
||||
Accepts multiple input iterables.
|
||||
|
||||
.. method:: difference_update(other)
|
||||
set -= other
|
||||
.. method:: difference_update(other, ...)
|
||||
set -= other | ...
|
||||
|
||||
Update the set, removing elements found in *other*.
|
||||
Update the set, removing elements found in others.
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Accepts multiple input iterables.
|
||||
|
||||
.. method:: symmetric_difference_update(other)
|
||||
set ^= other
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue