I am sorry, I was very tired yesterday and didn't clarify that it's not the typing package's fault.
The problem is that due to the "Pythonic way" most developers don't write code with types in mind, which means that it's impossible to require that something is something (i.e. it implements an interface). For instance, try requiring something to be the equivalent of ICloseable in C# using typing. You'd have to create an ABC (bleh) for that, and good luck forcing every Python user to describe the capabilities this way.
2
u/raiderrobert Mar 30 '18
Python 3.6 has type annotations: https://docs.python.org/3/library/typing.html
But I admit that project organization has room for improvement.