Nick Coghlan wrote:

> Assume the following is true for a type annotation system:
>    (T,) is equivalent to tuple[T]
>    (T1, T2) is equivalent to tuple[T1, T2]
>    (T1, T2, T3) is equivalent to tuple[T1, T2, T3]
> 
> but how do I use this system to spell the 
> type annotation for a tuple of unknown length containing only T instances?

   tuple[T, ...]

There wouldn't be any () equivalent, unless ... were made
a generally-available expression, in which case you could use

   (T, ...)

--
Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to