Could someone clarify the difference between runtime and static typing in this context? I get the general idea but don’t quite see how it applies to this discussion. As I understand it, this is about adding type hints to function parameters and return values.
For what it’s worth, I’m very much in favor of this. I’ve been using Python since 2008 (not professionally) and understand the duck typing philosophy. But typing introduces an interesting wrinkle. If something looks and behaves like a duck, it’s a duck.
The reverse is also true: to prove that something is a duck, you have to call quack() and hope it works, which isn’t exactly ideal. Typing doesn’t take away Python’s flexibility, but it does make intent clearer. And while it’s not perfect—IntelliSense might still suggest quack() on the wrong kind of object—it can eliminate a lot of guesswork. My main frustration is when PyCharm fails to infer the type of a Django object, leaving me to dig through documentation just to figure out what I’m dealing with. That alone makes typing worth it.
As for concerns about added complexity for Django developers—I get that this project depends on volunteers. But user demand is what keeps an open-source project alive, and typing isn’t going away. It’s an active part of Python’s evolution, and Django should engage with it sooner rather than later.