You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about the best dynamic checker of them all, Python itself?
100% accuracy in determining runtime type errors, with no annotations
required whatsoever :)
How about the best dynamic checker of them all, Python itself? 100% accuracy in determining runtime type errors, with no annotations required whatsoever :)
There are plenty of cases where Python will silently Do The Wrong Thing due to type errors.
One of the simple examples is if you end up calling iter('foo') rather than iter(['foo']).
Reacted by Ivan Levkivskyi, Mihai Capotă, Stefan Richthofer, Victor Sergienko, Emma Smith, Padoan, ut-adamc, pasinduxperiel, Jonas Hedman Engström, Ana Kucherova and 3 more
Activity
gvanrossum commentedon Apr 12, 2016
prechelt commentedon Apr 12, 2016
Don't ignore dynamic checking, which may help where static checking does not reach:
https://pypi.python.org/pypi/typecheck-decorator
Nice for instance for incremental sense-making when maintaining somebody else's code:
find out something, annotate it, run tests, and see whether it is indeed usually true.
Lutz
markshannon commentedon Apr 12, 2016
How about the best dynamic checker of them all, Python itself?
100% accuracy in determining runtime type errors, with no annotations
required whatsoever :)
Cheers,
Mark
o11c commentedon Apr 12, 2016
There are plenty of cases where Python will silently Do The Wrong Thing due to type errors.
One of the simple examples is if you end up calling
iter('foo')rather thaniter(['foo']).ilevkivskyi commentedon Apr 12, 2016
Since someone already mentioned this, I could add another runtime type checking tool that I have seen: https://github.com/agronholm/typeguard
JelleZijlstra commentedon Apr 11, 2021
Closing as this is no longer relevant