[Python-3000] Draft pre-PEP: function annotations (original) (raw)
Paul Prescod paul at prescod.net
Sun Aug 13 10:24:00 CEST 2006
- Previous message: [Python-3000] Draft pre-PEP: function annotations
- Next message: [Python-3000] Draft pre-PEP: function annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
Paul Prescod -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20060813/b232372c/attachment.htm
- Previous message: [Python-3000] Draft pre-PEP: function annotations
- Next message: [Python-3000] Draft pre-PEP: function annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]