On Thu, 26 Apr 2018 22:25:09 +0300
Serhiy Storchaka wrote:
>
> f(b=2, *[1]) is surprised in two ways:
>
> 1. Argument values are passed not in order. The first value is assigned
> to the second parameter, and the second value is assigned to the first
> parameter.
I don't find it that surprisi
On Thu, Apr 26, 2018 at 12:25 PM, Serhiy Storchaka wrote:
> f(b=2, *[1]) is surprised in two ways:
>
> 1. Argument values are passed not in order. The first value is assigned to
> the second parameter, and the second value is assigned to the first
> parameter.
>
> 2. Argument values are evaluated
I see no practical benefit to making such a restriction, and there's a
risk of breaking existing code.
While it's not something I've ever used myself in real code,
def wrapper(*args, **kw):
return wrapped_fn(some_arg=1, *args, **kw)
seems like a perfectly reasonable way to write a wr
There is an inconsistence in passing arguments to functions.
Explicit positional arguments should precede keyword arguments (both
explicit and variable), but variable positional arguments can follow
explicit keyword arguments and precede variable keyword arguments.
For example, for function