Multi-arg form for set.difference() and set.difference_update().

This commit is contained in:
Raymond Hettinger 2008-06-11 10:30:54 +00:00
parent 9d53457e59
commit 4267be6478
4 changed files with 66 additions and 21 deletions

View file

@ -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