[Python-3000] Type annotations: annotating generators

Guido van Rossum guido at python.org
Fri May 19 07:07:16 CEST 2006


On 5/18/06, Kay Schluehr <kay.schluehr at gmx.net> wrote:
> I have a question to the audience. How do you represent higher order
> functions using this syntax?

I think Collin and I both (independently) proposed the pragmatic
Function(<type>, <type>, ..., returns=<type>) for this.

We also discussed forward references; my proposal was that "lambda:A"
would be equivalent to "A" but usable as a forward reference.

> Another question: is there any intention to
> support ML style quards for pattern matching on algebraic /recursive types?

Can you rephrase that without references to ML or quads?

> I'm still not sure I like this whole idea in the Python context ( I'm
> less concerned with syntax scrabbling but the semantics ) but anyway I'm
> curious how it evolves.

Fair enough.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list