[Python-ideas] Proposal: Use mypy syntax for function annotations

Antoine Pitrou antoine at python.org
Mon Aug 25 05:03:46 CEST 2014


Le 24/08/2014 22:51, Antoine Pitrou a écrit :
>
> Le 24/08/2014 22:30, Guido van Rossum a écrit :
>>
>> People who are talking about what should happen if a decorator changes
>> __annotations__ are likewise missing the point.
>
> But you shouldn't use annotations for something that refuses to use
> runtime introspection abilities. There's no reason to waste annotations
> if the need can be fullfilled by separate description files in a DSL
> that doesn't even need to be Python code (but cutely looks like so).

(*) or a docstring-embedded DSL, as others acutely remarked.

Regards

Antoine.




More information about the Python-ideas mailing list