Re:Static types in Python
by ddfisher on Thursday October 13, 2016 @05:40PM
(#12704280)
Yeah, you need to write `from typing import List` to get the generic List class that you can parameterize with an item type. As you pointed out, you can use the builtin lowercase-l list without importing anything, but that doesn't allow you to specify the item type.
[ Parent
| on HN ]
There are no comments on this comment yet.