Skip to content

Commit

Permalink
more review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Jun 17, 2024
1 parent e5943a4 commit effcdec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions docs/spec/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ visualize this analogy in the following table:
* - ``B`` is :term:`equivalent` to ``A``
- ``B`` is :term:`consistent` with ``A``

In addition to these analogous relations, we can also define equivalence on
gradual types. Two gradual types ``A`` and ``B`` are equivalent (that is, the
same gradual type, not merely consistent with one another) if and only if all
materializations of ``A`` are also materializations of ``B``, and all
materializations of ``B`` are also materializations of ``A``.
We can also define equivalence on gradual types. Two gradual types ``A`` and
``B`` are equivalent (that is, the same gradual type, not merely consistent
with one another) if and only if all materializations of ``A`` are also
materializations of ``B``, and all materializations of ``B`` are also
materializations of ``A``.

Attributes and methods
----------------------
Expand Down
8 changes: 4 additions & 4 deletions docs/spec/generics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2020,9 +2020,9 @@ normal subscription rules, non-overridden defaults should be substituted.
Using ``bound`` and ``default``
"""""""""""""""""""""""""""""""

If both ``bound`` and ``default`` are passed, ``default`` must be a
:term:`consistent subtype` of ``bound``. If not, the type checker should
generate an error.
If both ``bound`` and ``default`` are passed, ``default`` must be
:term:`assignable` to ``bound``. If not, the type checker should generate an
error.

::

Expand Down Expand Up @@ -2297,7 +2297,7 @@ constructions with subclasses:
def ordinal_value(self) -> str:
return as_ordinal(self.value)

# Should not be OK because LinkedList[int] is not a consistent subtype of
# Should not be OK because LinkedList[int] is not assignable to
# OrdinalLinkedList, but the type checker allows it.
xs = OrdinalLinkedList(value=1, next=LinkedList[int](value=2))

Expand Down
8 changes: 4 additions & 4 deletions docs/spec/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ This section defines a few terms that may be used elsewhere in the specification

consistent
Two :term:`fully static types <fully static type>` are "consistent with"
each other if they are the same type. Two gradual types are "consistent
with" each other if they could :term:`materialize` to the same type. See
:ref:`type-system-concepts`. If two types are consistent, they are both
:term:`assignable` to and from each other.
each other if they are :term:`equivalent`. Two gradual types are
"consistent with" each other if they could :term:`materialize` to the
same type. See :ref:`type-system-concepts`. If two types are consistent,
they are both :term:`assignable` to and from each other.

consistent subtype
"Consistent subtype" is synonymous with ":term:`assignable` to" (and
Expand Down

0 comments on commit effcdec

Please sign in to comment.