4 ms·
You want dependent types!
by Jeff_Brown 4y ago
You want dependent types!
- Spivak 4y agoPython can actually do (some) dependent types with generics but it's not pretty. The only real use-case that is both possible and worthwhile I've found is being able to say a value is a T if there's a default and an Optional[T] otherwise.
- still_grokking 4y ago> Python can actually do (some) dependent types with generics Could you show some examples?