[issue40408] GenericAlias does not support nested type variables

Ivan Levkivskyi report at bugs.python.org
Mon May 4 04:30:23 EDT 2020


Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

> But this behavior is not specified and is not covered by tests.

FWIW, to be most close to the static type checkers behavior, both D[int][str] and D[int, str] should fail for D = Dict[T, List]. Not important however, since this is a really rare corner case I think.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40408>
_______________________________________


More information about the Python-bugs-list mailing list