This commit is contained in:
Raymond Hettinger 2016-09-12 23:39:05 -07:00
commit dcbed36e71
1 changed files with 6 additions and 6 deletions

View File

@ -3875,17 +3875,17 @@ The constructors for both classes work the same:
Test whether the set is a proper superset of *other*, that is, ``set >= Test whether the set is a proper superset of *other*, that is, ``set >=
other and set != other``. other and set != other``.
.. method:: union(other, ...) .. method:: union(*others)
set | other | ... set | other | ...
Return a new set with elements from the set and all others. Return a new set with elements from the set and all others.
.. method:: intersection(other, ...) .. method:: intersection(*others)
set & other & ... set & other & ...
Return a new set with elements common to the set and all others. Return a new set with elements common to the set and all others.
.. method:: difference(other, ...) .. method:: difference(*others)
set - other - ... set - other - ...
Return a new set with elements in the set that are not in the others. Return a new set with elements in the set that are not in the others.
@ -3935,17 +3935,17 @@ The constructors for both classes work the same:
The following table lists operations available for :class:`set` that do not The following table lists operations available for :class:`set` that do not
apply to immutable instances of :class:`frozenset`: apply to immutable instances of :class:`frozenset`:
.. method:: update(other, ...) .. method:: update(*others)
set |= other | ... set |= other | ...
Update the set, adding elements from all others. Update the set, adding elements from all others.
.. method:: intersection_update(other, ...) .. method:: intersection_update(*others)
set &= other & ... set &= other & ...
Update the set, keeping only elements found in it and all others. Update the set, keeping only elements found in it and all others.
.. method:: difference_update(other, ...) .. method:: difference_update(*others)
set -= other | ... set -= other | ...
Update the set, removing elements found in others. Update the set, removing elements found in others.