[Python-ideas] Optional static typing -- the crossroads

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Aug 16 02:14:36 CEST 2014


Sunjay Varma wrote:
> dict[str, int] looks very much like I'm 
> getting an item (str, int) from some class.

If you consider that 'dict' on its own represents a set of
possible types, then it's not unreasonable that 'dict[str, int]'
selects one of the types from that set.

In other words, dict is a lazy collection of types.

-- 
Greg


More information about the Python-ideas mailing list