[Python-3000] Type annotations: annotating generators

Kay Schluehr kay.schluehr at gmx.net
Fri May 19 07:02:19 CEST 2006


Collin Winter schrieb:

>In working on notes for the type annotations PEP, I've hit some
>ambiguous/unresolved issues in the BDFL annotation syntax (drawing
>primarily from [1] and other blog posts):
>
>As a quick recap, the syntax looks something like this:
>
>"""def foo(a: int, b: float, c: int = 5) -> list[int]"""
>  
>

I have a question to the audience. How do you represent higher order 
functions using this syntax? Another question: is there any intention to 
support ML style quards for pattern matching on algebraic /recursive types?

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.

Kay





More information about the Python-3000 mailing list