5 ms·
Type hints are machine-checkable documentation, similar to doctests in my view. Since I started using them, the number of runtime errors coming out from my own
by bow_ 6y ago
Type hints are machine-checkable documentation, similar to doctests in my view.
Since I started using them, the number of runtime errors coming out from my own code has been drastically reduced.
Of course one can always go overboard with those `Generic[T]` hints. Though this is a problem of the tool user, not the tool.