Samuele Pedroni wrote:
> Nick Coghlan wrote:
> 
>>What would a separate sig expression buy you over defining "->expr" as a 
>>special form of keyword argument that binds to the keyword name "return" 
>>in the dictionary for storing extra keyword arguments?
> 
> 
> seems to me a quirky addition of sugar, also could not be limited; I 
> prefer going the full length and supporting argument name introduction 
> with : etc. as shown in the example.
> 

to be more precise, I find:

@sig a: int, b: int -> int

more readable and to the point than: @sig(a=int,b=int,->int).
First-class sig expressions can have rules to leave out parens
as genexp etc.

Also it can be extended to support attaching annotations to * and ** 
args. It would be hard to devise separate sugar for those.

> But it seems we agree that interspensing the annotation in the main
> head of the function is not such a great idea after all.
> _______________________________________________
> Python-3000 mailing list
> Python-3000@python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-3000/pedronis%40strakt.com

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
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