Message243199
Le 14/05/2015 17:40, Yury Selivanov a écrit :
>
> Do you have any good use case for this?
Passing a parameter around without having to pass the index separately :-)
> In one of the first iterations of PEP 362 we had Parameter.index.
However, we later redesigned the object to work as a building block --
immutable, and explicitly detached from its parent Signature. This way
there is nothing wrong in taking a parameters from one signature, and
using them to build a new one.
I see. That might be annoying in that case, indeed.
> Another reason is that we don't preserve the order of keyword
arguments.
What do you mean? In Signature or in BoundArguments? I would hope that
Signature keeps it.
> And having things like '*args' further disconnects parameters
> indexes from arguments indexes.
Not necessarily. In my case, I treat a stararg parameter as a single
parameter. |
|
Date |
User |
Action |
Args |
2015-05-14 15:44:11 | pitrou | set | recipients:
+ pitrou, brett.cannon, larry, yselivanov |
2015-05-14 15:44:11 | pitrou | link | issue24189 messages |
2015-05-14 15:44:10 | pitrou | create | |
|