[Python-3000] Draft pre-PEP: function annotations (original) (raw)
Josiah Carlson jcarlson at uci.edu
Sun Aug 13 10:53:23 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 ]
"Paul Prescod" <paul at prescod.net> wrote:
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.
Right. What I meant (which perhaps wan't what I said), was that we should define the order in which functions that operate on these annotations execute, regardless of the mechanism. Say, for example, I have the following function definition:
def foo(arg1:[bar(1), baz(2)]):
...However the (unspecified user defined machinery that handles the) annotation processing gets to foo(), if it knows about how to handle the 'bar' and 'baz' annotations, a properly written annotation processor will handle the 'bar' annotation before the 'baz' annotation.
- Josiah
- 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 ]