[Python-ideas] Annotations (and static typing)
Ethan Furman
ethan at stoneleaf.us
Wed Aug 20 21:37:55 CEST 2014
On 08/20/2014 12:02 PM, Yann Kaiser wrote:
> Let's add convenient namespacing to that list:
>
> @annotate('typing', one=str, two=int, three=int)
> @annotate('cli', two=int, three='t')
> def func(one, two, *, three=5):
> ...
For what I was thinking, the above decorator would store the different annotations in, for example, func._typing and
func._cli.
--
~Ethan~
More information about the Python-ideas
mailing list