[Python-3000] Draft pre-PEP: function annotations
paul at prescod.net
Sun Aug 13 10:24:00 CEST 2006
On 8/13/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> If we were to specify anything, I would suggest we define an order of
> annotation calling, which would also define a chaining order if
> applicable. Maybe it is completely obvious, but one should never
> underestimate what kinds of silly things users will do.
Annotations are not called. They are not like decorators. Decorators
typically "wrap" a function. Annotations are just attached to it. A
decorator must be a callable. An annotation could be just the number "5".
Decorators build on each other, perhaps changing the function's behaviour.
Annotations (should!) just accumulate and typically do not change the
parameter's behaviour. The PEP does not say how you would define annotations
that just accumulate but it seems common sense to me that it would be
through a list syntax. I think that the PEP should just say that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-3000