We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5863242 commit c048835Copy full SHA for c048835
1 file changed
docs/source/common_issues.rst
@@ -307,8 +307,10 @@ Most mutable generic collections are invariant. When using the legacy
307
``TypeVar`` syntax, mypy considers all user-defined generic classes invariant
308
by default (see :ref:`variance-of-generics` for motivation). When using the
309
:pep:`695` syntax (``class MyClass[T]: ...``), variance is inferred from
310
-usage rather than defaulting to invariant. This could lead to some unexpected
311
-errors when combined with type inference. For example:
+usage rather than defaulting to invariant.
+
312
+The fact that mutable sequences are usually invariant can lead to some
313
+unexpected errors when combined with type inference. For example:
314
315
.. code-block:: python
316
0 commit comments