@@ -4737,9 +4737,10 @@ The constructors for both classes work the same:
4737
4737
Return a shallow copy of the set.
4738
4738
4739
4739
4740
- Note, the non-operator versions of :meth: `union `, :meth: `intersection `,
4741
- :meth: `difference `, :meth: `symmetric_difference `, :meth: `issubset `, and
4742
- :meth: `issuperset ` methods will accept any iterable as an argument. In
4740
+ Note, the non-operator versions of :meth: `~set.union `,
4741
+ :meth: `~set.intersection `, :meth: `~set.difference `,
4742
+ :meth: `~set.symmetric_difference `, :meth: `~set.issubset `, and
4743
+ :meth: `~set.issuperset ` methods will accept any iterable as an argument. In
4743
4744
contrast, their operator based counterparts require their arguments to be
4744
4745
sets. This precludes error-prone constructions like ``set('abc') & 'cbs' ``
4745
4746
in favor of the more readable ``set('abc').intersection('cbs') ``.
@@ -4815,10 +4816,10 @@ The constructors for both classes work the same:
4815
4816
Remove all elements from the set.
4816
4817
4817
4818
4818
- Note, the non-operator versions of the :meth: `update `,
4819
- :meth: `intersection_update `, :meth: `difference_update `, and
4820
- :meth: `symmetric_difference_update ` methods will accept any iterable as an
4821
- argument.
4819
+ Note, the non-operator versions of the :meth: `~set. update `,
4820
+ :meth: `~set. intersection_update `, :meth: `~set. difference_update `, and
4821
+ :meth: `~set. symmetric_difference_update ` methods will accept any iterable as
4822
+ an argument.
4822
4823
4823
4824
Note, the *elem * argument to the :meth: `~object.__contains__ `,
4824
4825
:meth: `remove `, and
0 commit comments