Skip to content

Commit f041059

Browse files
committed
adjust references to set/frozenset methods in the docs
1 parent 5f5a34d commit f041059

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Doc/c-api/set.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
147147
148148
Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an
149149
error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a
150-
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~frozenset.discard`
150+
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard`
151151
method, this function does not automatically convert unhashable sets into
152152
temporary frozensets. Raise :exc:`SystemError` if *set* is not an
153153
instance of :class:`set` or its subtype.

Doc/library/collections.abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ classes supporting container APIs. For example, to write a class supporting
380380
the full :class:`Set` API, it is only necessary to supply the three underlying
381381
abstract methods: :meth:`~object.__contains__`, :meth:`~container.__iter__`, and
382382
:meth:`~object.__len__`. The ABC supplies the remaining methods such as
383-
:meth:`!__and__` and :meth:`~frozenset.isdisjoint`::
383+
:meth:`!__and__` and :meth:`~set.isdisjoint`::
384384

385385
class ListBasedSet(collections.abc.Set):
386386
''' Alternate set implementation favoring space over speed

Doc/library/stdtypes.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4737,9 +4737,10 @@ The constructors for both classes work the same:
47374737
Return a shallow copy of the set.
47384738

47394739

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
47434744
contrast, their operator based counterparts require their arguments to be
47444745
sets. This precludes error-prone constructions like ``set('abc') & 'cbs'``
47454746
in favor of the more readable ``set('abc').intersection('cbs')``.
@@ -4815,10 +4816,10 @@ The constructors for both classes work the same:
48154816
Remove all elements from the set.
48164817

48174818

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.
48224823

48234824
Note, the *elem* argument to the :meth:`~object.__contains__`,
48244825
:meth:`remove`, and

0 commit comments

Comments
 (0)