list[type, type, ...] ?!
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Dec 3 18:15:07 EST 2020
On 3/12/20 7:37 pm, Paul Bryan wrote:
>>>> list[int, int]
> list[int, int]
>
> In fact, it appears I can specify an indeterminate number of types.
I think the built-in generic alias just provides the minimum
necessary to be able to write sometype[arg, ...]. It doesn't
know anything about the semantics with respect to particular
types -- that's left to the type checkers.
--
Greg
More information about the Python-list
mailing list