DEV Community

[Comment from a deleted post]
Collapse
 
paddy3118 profile image
Paddy3118 • Edited

It seems that in Python, type annotations may be partial; checked or not; annotating the source or kept in a separate file.

So long as it doesn't restrict the dynamism, I approve.

Collapse
 
nestedsoftware profile image
Nested Software • Edited

Yes, that's definitely interesting. I feel like if we're using type annotations in python, we really should be checking them with something like mypy. The worst thing, kind of the worst of both worlds, would be to have type annotations that aren't actually in sync with what the code is doing!