"Talin" <talin at acm.org> wrote in message news:4453B025.3080100 at acm.org... > > def sortwords(*wordlist, case_sensitive=False): The rationale for this is pretty obvious. But ... > The second syntactical change is to allow the argument name to > be omitted for a varargs argument: > > def compare(a, b, *, key=None): > ... > > The reasoning behind this change is as follows. Imagine for a > moment a function which takes several positional arguments, as > well as a keyword argument: > > def compare(a, b, key=None): > ... > > Now, suppose you wanted to have 'key' be a keyword-only argument. Why? Why not let the user type the additional argument(s) without the parameter name? tjr
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