Skip to content

Commit

Permalink
re: sets, "subclass/superclass" should be "subset/superset" (#2138)
Browse files Browse the repository at this point in the history
re: sets, "subclass/superclass" should be "subset/superset" when referring to the inequality operations on sets.
  • Loading branch information
joseville1001 authored Nov 8, 2021
1 parent 2eaa17b commit a66ce05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pep-3119.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,13 @@ type ``frozenset`` derives from ``Set`` and ``Hashable``.
those three classes is a set though! Sets have the additional
invariant that each element occurs only once (as can be determined
by iteration), and in addition sets define concrete operators that
implement the inequality operations as subclass/superclass tests.
implement the inequality operations as subset/superset tests.
In general, the invariants for finite sets in mathematics
hold. [11]_

Sets with different implementations can be compared safely,
(usually) efficiently and correctly using the mathematical
definitions of the subclass/superclass operations for finite sets.
definitions of the subset/supeset operations for finite sets.
The ordering operations have concrete implementations; subclasses
may override these for speed but should maintain the semantics.
Because ``Set`` derives from ``Sized``, ``__eq__`` may take a
Expand Down

0 comments on commit a66ce05

Please sign in to comment.