|
|
|
|
|
by Locke1689
5000 days ago
|
|
Because there is no type. It's dynamic. You can't figure out what the type is unless you run the code. def do_something(thing_a, thing_b):
... What's the type of thing_a or thing_b? There is none. There isn't even a type globally. thing_a and thing_b acquire new types at every call instance. This basically screws you for all useful auto-complete information. You can't even do proper go-to-definition because of things like getattr. |
|
Yes, maybe there are situations where dozens of different types are passed in by different calls, or where we're building a library and we don't have any calls to do_something in our codebase, and cases where everything is obfuscated by one means or another. But depending on style I bet there are lots of cases where it works out ok.