Collin Winter wrote:

> @docstring
> @typechecker
> @constrain_values
> def foo(a: {'doc': "Frobnication count",
>            'type': Number,
>            'constrain_values': range(3, 9)},
>        b: {'type': Number,
>             # This can be only 4, 8 or 12
>            'constrain_values': [4, 8, 12]}) -> {'type': Number}

There's another thing that's bothering me about all this.
The main reason Guido rejected the originally suggested
syntax for function decorators was that it put too much
stuff into the function header and obscured the signature.

Now we seem to be about to open ourselves up to the
same problem on an even bigger scale. Who can honestly
say that the above function declaration is easy to read?
To me it looks downright ugly.

--
Greg
_______________________________________________
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