
Feb. 27, 2004
12:59 a.m.
Bob Ippolito wrote:
def myfunc(x, y) [accepts(int, int), returns(int)]: pass
Nothing stops you from (ab)using this syntax to do it.. but you may need to specify kwarg names twice if you want to skip some, and you would probably have a hard time deciding how to spell adaptation of *args or **kwargs :)
Why? Inventing obcure syntax is an easy part: def myfunc(*x, **y) [accepts([int], {string:int}), returns(int)]: pass Hard part is keep it simple and useful. ;) Mike