[issue24189] Parameter doesn't expose its index

Antoine Pitrou report at bugs.python.org
Thu May 14 17:58:32 CEST 2015


Antoine Pitrou added the comment:

Le 14/05/2015 17:49, Yury Selivanov a écrit :
> 
>> What do you mean? In Signature or in BoundArguments? I would hope
>> that
> Signature keeps it.
> 
> I mean during the actual call, as **kwargs aren't ordered.
> 
> I think having indexes for parameters would make sense for a language
> like JS or C, where there are no keyword arguments, and indexes of
> parameters match indexes of arguments.

As mentioned in the issue, when re-implementing function calls, you have
to flatten the arguments into a simple argument list (because the
function parameters are actually a sequence (*), despite Python's rich
function call possibilities).

(*) at least for pure Python functions, where the arguments are simply
pushed sequentially on the ceval stack

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24189>
_______________________________________


More information about the Python-bugs-list mailing list