From 0f20821c01ad766723a617da42e783cb05872383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20S=C5=82awecki?= Date: Sun, 12 Jan 2025 03:16:15 +0100 Subject: [PATCH 1/2] Glossary: Improve gradual form and gradual type definitions --- docs/spec/glossary.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/spec/glossary.rst b/docs/spec/glossary.rst index f17ffb61..593a56d4 100644 --- a/docs/spec/glossary.rst +++ b/docs/spec/glossary.rst @@ -65,7 +65,11 @@ This section defines a few terms that may be used elsewhere in the specification primary gradual form is :ref:`Any`. The ellipsis (``...``) is a gradual form in some, but not all, contexts. It is a gradual form when used in a :ref:`Callable` type, and when used in ``tuple[Any, ...]`` (but not in - other :ref:`tuple ` types). + other :ref:`tuple ` types). Types that contain gradual forms do not participate + in the :term:`subtype` relation, but they do participate in + :term:`consistency ` and :term:`assignability `. + They can be :term:`materialized ` to a more static, or fully static, + type. See :ref:`type-system-concepts`. gradual type All types in the Python type system are "gradual". A gradual type may be @@ -73,11 +77,7 @@ This section defines a few terms that may be used elsewhere in the specification contains ``Any`` or another :term:`gradual form`. A gradual type does not necessarily represent a single set of possible runtime values; instead it can represent a set of possible static types (a set of possible sets of - possible runtime values). Gradual types do not participate in the - :term:`subtype` relation, but they do participate in :term:`consistency - ` and :term:`assignability `. They can be - :term:`materialized ` to a more static, or fully static, - type. See :ref:`type-system-concepts`. + possible runtime values). inline Inline type annotations are annotations that are included in the From 1112fd53973a71639e9e0a836e5e68e2a34678ed Mon Sep 17 00:00:00 2001 From: bswck Date: Sat, 8 Feb 2025 21:34:18 +0100 Subject: [PATCH 2/2] Glossary: Restore the original order of notes on not fully static gradual types --- docs/spec/glossary.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/spec/glossary.rst b/docs/spec/glossary.rst index 593a56d4..1acbcc95 100644 --- a/docs/spec/glossary.rst +++ b/docs/spec/glossary.rst @@ -65,11 +65,7 @@ This section defines a few terms that may be used elsewhere in the specification primary gradual form is :ref:`Any`. The ellipsis (``...``) is a gradual form in some, but not all, contexts. It is a gradual form when used in a :ref:`Callable` type, and when used in ``tuple[Any, ...]`` (but not in - other :ref:`tuple ` types). Types that contain gradual forms do not participate - in the :term:`subtype` relation, but they do participate in - :term:`consistency ` and :term:`assignability `. - They can be :term:`materialized ` to a more static, or fully static, - type. See :ref:`type-system-concepts`. + other :ref:`tuple ` types). gradual type All types in the Python type system are "gradual". A gradual type may be @@ -77,7 +73,11 @@ This section defines a few terms that may be used elsewhere in the specification contains ``Any`` or another :term:`gradual form`. A gradual type does not necessarily represent a single set of possible runtime values; instead it can represent a set of possible static types (a set of possible sets of - possible runtime values). + possible runtime values). Gradual types which are not fully static do not + participate in the :term:`subtype` relation, but they do participate in + :term:`consistency ` and :term:`assignability `. + They can be :term:`materialized ` to a more static, or fully static, + type. See :ref:`type-system-concepts`. inline Inline type annotations are annotations that are included in the