25 Sep
2020
25 Sep
'20
6:18 p.m.
On Fri, 25 Sep 2020 at 14:44, Samuel Colvin
Sorry I probably wasn't clear enough in what I was suggesting.
The main question here is why using a hint or a decorator should be better than a simple documentation.
For the same reason type hints are better than documentation
Type hints help an IDE to check if you're potentially passing a bad parameter to your function. What does an "exception hint" will do in an IDE? Alerts you that you are not catching that exception, and, if you really want it to bubble up, silencing that warning? Again, no thanks :-)