On Dec 29, 2006, at 4:09 PM, BJörn Lindqvist wrote:

I think this rationale is very lacking and to weak for such a big
change to Python. I definitely like to see it expanded.

The reference links to two small libraries implementing type checking
using decorators and doc strings. None of which to seem to be very
popular in the Python community. Surely, those two libraries *alone*
can't be enough of a motivation for this? To me, it is far from
self-evident what purpose function annotations would serve.

I also wonder why a very obtrusive syntax addition is needed when it
clearly is possible to annotate functions in today's Python. Why is
syntax better than just adding a function annotation decorator to the
standard library?

    @annotate(a = int, b = dict, c = int)
    def foo(a, b, c = 5):
        ...

Are decorators to ugly?

The syntax does look better than a decorator. The syntax also provides
a notation for documentation to follow. Even a standard decorator won't
help with that. I am surprised you think the syntax is more obstrusive than the
decorator.

-Tony

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to