[Python-ideas] PEP 484 evolution

Rick Johnson rantingrickjohnson at gmail.com
Sat Mar 19 09:05:04 EDT 2016


On Friday, March 18, 2016 at 5:59:42 PM UTC-5, Ryan Gonzalez wrote:
> Neither! Python 3 type hints are just function
> annotations. It's the job of a type checker/linter (like
> mypy) to actually decipher the annotations as types.
> Adding/removing type hints won't have a runtime effect on
> your program.

Thanks for explaining -- i now understand what's going on
here... So even though type-hints are "interleaved within the
code", at run-time, they have no meaning, and are simply
ignored as if they were comments -- it's my worst nightmare
come true -- starting with Python 3.5, the readability of
Python source will never be the same again. And while i
understand that type-hints are optional, once they placed in
the code, it is impossible not to be forced to read them. 

> I think the latter [code example you provided] is for Python 2.

Hmm, being that Guido said his "list of issues" was relevant
only to 3.5.2, that would not make sense to me. But perhaps i'm
missing something again???

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160319/0fe77b18/attachment.html>


More information about the Python-ideas mailing list