[Python-3000] Questions on optional type annotations

Talin talin at acm.org
Thu May 11 08:33:09 CEST 2006


Guido van Rossum wrote:
> I think it would be useful to have a notation that can express
> signatures. I haven't spent much time thinking about what this would
> look like, but I'd like it to require no new syntax beyond the concept
> of type annotations. If this means you can't have the inline
> equivalent of your (int int -> int), then perhaps it could be done by
> referencing some prototype with the appropriate annotations. Or
> perhaps someting as crude as Function(type, type, ..., returns=type)
> would be good enough for inlining this.

I haven't forgotten that you asked me to write up a PEP for a signature 
API in conjunction with the keyword arguments PEP. However, I don't yet 
feel that the ideas have gelled enough to do so yet -- or at least, I 
don't feel competent to come up with a definative solution.

-- Talin


More information about the Python-3000 mailing list