Talin wrote:
> 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.

The first draft doesn't have to be definitive :)

However, being able to create a signature object independently of a def 
statement is definitely something that should be in there - we'll need it for 
annotating C methods anyway, so it may make sense to start with that, and then 
look at making it an integral part of the function header afterwards.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to