On 20/06/17, Toshio Kuratomi wrote:
> On Tue, Jun 20, 2017 at 6:06 AM, Kushal Das <[email protected]> wrote:
> >  Type annotations or type hints are purely for
> > external type checking tools, they do not affect the Python interpreter
> > anyway.
> 
> Note that this statement is incorrect.  Code like this:
> https://docs.python.org/3/library/typing.html#user-defined-generic-types
> where inheritance of a class from the typing module is used affects
> running code.  Mark Shannon gave a talk at the pycon language summit
> and plead for the typing module to divorce type checking from
> inheritance and pointed out that the implementation slows down
> runtime.  He further pointed out that using inheritance for type
> information like this was not a proper fit; that sometimes the class
> inherited from should not have anything to do with the type
> information.
Thanks for pointing this one out, I somehow missed both of Mark's talks
in the language summit. Now, I went back and read the report on his
talk[1]. I hope the core-denels will come up with solutions to the
problem he pointed up in proper time.

Thanks once again for pointing this one.


[1] https://lwn.net/Articles/724639/

Kushal
-- 
Fedora Cloud Engineer
CPython Core Developer
https://kushaldas.in
https://dgplug.org
_______________________________________________
infrastructure mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to