A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042798.html below:

new syntax for wrapping(PEP 318)]

[Python-Dev] Re: other uses for "as" [was Re: new syntax for wrapping(PEP 318)] [Python-Dev] Re: other uses for "as" [was Re: new syntax for wrapping(PEP 318)]Mike Rovner mike at nospam.com
Thu Feb 26 19:59:59 EST 2004
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






More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4