[Python-3000] Draft pre-PEP: function annotations

Collin Winter collinw at gmail.com
Sat Aug 12 06:33:28 CEST 2006

> I don't see the point of this.  A decorator should be responsible for
> manipulating the signature of its return value.  Meanwhile, the semantics
> for combining annotations should be defined by an overloaded function like
> "combineAnnotations(a1,a2)" that returns a new annotation.  There is no
> need to have a special chaining decorator.
> May I suggest that you try using Guido's Py3K overloaded function
> prototype?  I expect you'll find that if you play around with it a bit, it
> will considerably simplify your view of what's required to do this.  It
> truly isn't necessary to predefine what an annotation is, or even any
> structural constraints on how they will be combined, since the user is able
> to define for any given type how such things will be handled.

I've looked at Guido's overloaded function prototype, and while I
think I'm in the direction of understanding, I'm not quite there 100%.

Could you illustrate (in code) what you've got in mind for how to
apply overloaded functions to this problem space?

Collin Winter

More information about the Python-3000 mailing list