[Python-ideas] Typecheckers: there can be only one

Ivan Levkivskyi levkivskyi at gmail.com
Wed Sep 7 18:11:17 EDT 2016


On 8 September 2016 at 00:00, Paul Moore <p.f.moore at gmail.com> wrote:


> > Type annotations are code, not tests.
>
> Not in Python they aren't.
>

Well, to a certain extent. One can try something like this in REPL:

from typing import get_type_hints
import __main__

s: str

class C:
    x: int

get_type_hints(C)
get_type_hints(__main__)

Although please remember that the PEP is still provisional and
implementation details may change.

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160908/ec7a7544/attachment.html>


More information about the Python-ideas mailing list