[Python-ideas] Optional Static Typing -- the Python Way

Antoine Pitrou antoine at python.org
Wed Aug 20 01:02:50 CEST 2014


Le 19/08/2014 18:50, Terry Reedy a écrit :
> On 8/19/2014 9:27 AM, Nick Coghlan wrote:
>
> What I like: 'optional type hints' based on a fleshed-out ABC systems
> that collects all ABCs together on one module via import from current
> files. It seems that we have been slowly groping towards this for years.

Hmm, I've been saying this already, but my intuition is that it's a bad 
idea to conflate *type descriptions* (what this proposal is about) and 
actual *runtime types* (what ABCs are).

Besides, the fact that type descriptions must be parametrable, and 
therefore end up being used as instances, sounds like it kills the idea 
of making them regular (runtime) types as well. Unless we make them 
metaclasses?

Regards

Antoine.




More information about the Python-ideas mailing list