[Python-ideas] PEP 484 (Type Hints) -- first draft round

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jan 22 01:04:36 CET 2015

On 01/22/2015 11:30 AM, Guido van Rossum wrote:
> But the static checker is like a linter and it's common to run those
> infrequently (e.g. only when submitting a diff for review) while running
> unittests frequently (e.g. whenever the developer has written some new code).
> Assuming you have fast unittests.

This still doesn't make sense to me. If your unit tests are any
good, they'll contain tests that use the types you're supposed to
be importing, so they'll fail if you forget to import them.

> And, having coded up much of a possible typing.py module already
> (https://github.com/ambv/typehinting/tree/master/prototyping) I really don't
> see the big problem with run-time evaluation of constraints.

Well, having to quote forward-referenced types is a fairly big
aesthetic problem for me, even if it's not a practical one. To
my mind it's a worse syntactic hack than '::' would be. But it
seems you're not bothered by it so much.


More information about the Python-ideas mailing list