News for hackers. Stuff that matters.
Re:Static types in Python by Animats on Friday October 14, 2016 @01:59AM (#12706371)
If you add type hints to a function and it detects an error because it's called with the wrong type, it probably didn't work anyway.

I've run into that with functions that take NumPy arrays. You can pass a Python array, but "+" behaves very differently. For a NumPy array, it's element by element addition. For a Python array, it's concatenation. You want to catch that.

There are no comments on this comment yet.