On 2021-09-04 05:47, Matsuoka Takuo wrote:
On Sat, 4 Sept 2021 at 16:33, Brendan Barnwell
wrote: In other words, currently `*` can turn what looks like one function call with one thing inside it into one function call with several things inside it. You are proposing to make it so `*` can turn one indexing operation with one thing inside it into several indexing operations each with one thing inside it. I think that is quite different.
I'm not strongly against your conclusion, but I think the two use of `*` are analogous in fact. Consider for instance,
``` from functools import partial
curry = partial(partial, partial) F = curry(curry(f)) ```
Now F has the same amount of information as f does in the sense that e.g., `f(1,2,3)` is equivalent to `F(1)(2)(3)`. I suspect the proposer's idea comes from an analogy to this.
But where is the *-unpacking there? You just showed a function-call equivalent of the multi-getter function that I suggested. I agree that's useful in that if you want to convert multiple arguments into multiple function calls you can make a new function that does that, but that's not what *-unpacking does. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown