[Python-ideas] PEP 484 evolution
Chris Angelico
rosuav at gmail.com
Sat Mar 19 22:29:36 EDT 2016
On Sun, Mar 20, 2016 at 1:21 PM, Alexander Walters
<tritium-list at sdamon.com> wrote:
> I don't exactly see how stub files would be any different than tests in this
> regard. Unless I am totally misunderstanding something, the type hints only
> exist to make static analysis by tools (presumably in a test suite) easier.
> Why would a failing static analysis check go unnoticed and not the a test?
> Why is there no argument to integrate the test suite into the module under
> test, by the same logic?
There are - look at things like doctest. However, tests tend to be
much longer-winded than type hints - even the most verbose of type
hints - so the cost of keeping them inline is far higher.
The benefits are similar, though.
ChrisA
More information about the Python-ideas
mailing list