3 ms·
Type hints work fine. They are hints (that are checkable through tools) > But as a general rule: You don’t know if there really is a tool in place to check the
by raverbashing 5y ago
Type hints work fine. They are hints (that are checkable through tools)
> But as a general rule: You don’t know if there really is a tool in place to check them.
Cool. So you just go and do stupid stuff if no one is looking?
Check it yourself. They're probably there for a reason. If you think they're not needed, then sure, take them out.
> Most of this turned out to be wrong and it threw me off the track during my debugging session.
Here's an idea: Then why don't you fix it. If I see code that's wrong or bad, I go and fix it. It's your responsibility as well
Now maybe try acting like they're anything but type hints (and I'm very glad Guido insisted it is optional and flexible - the last thing the world needed is for Python to get consumed by Java type checking pedantry where the compiler needs you to annotate every single thing)
And every time I do something in Python that would be "impossible" in Java I'm glad I'm not bound by the small-minded type pedantry of Java.
- wvenable 5y agoCan't you just type something as `object` in Java and make anything possible?
- raverbashing 5y agoIt might be possible for some cases, yes. But not for function pointers. And you don't get duck typing.