Parens do create a tuple
Random832
random832 at fastmail.com
Sun Apr 10 22:51:35 EDT 2016
On Sun, Apr 10, 2016, at 22:32, Steven D'Aprano wrote:
> def func(arg1, arg2, arg3):
> pass
>
> func(1, 2, 3)
>
> does not create a tuple (1, 2, 3) anywhere in its execution.
Well, the second argument to PyObject_Call and function_call is a tuple,
which had to come from somewhere. That may be a CPython implementation
detail, but what else could __call__'s prototype be but (self, *args,
**kwargs)?
> Live by pedantry, die by pedantry.
More information about the Python-list
mailing list