Dear Brendan Barnwell, On Sun, 5 Sept 2021 at 05:06, Brendan Barnwell <brenb...@brenbarn.net> wrote: > > On 2021-09-04 05:47, Matsuoka Takuo wrote: ...... > > ``` > > 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?
Sure. `f(1,2,3)` is equivalent to `f(*(1,2,3))`. My understanding of Kevin Mills' suggestion is `f(1,2,3)` is not analogous to `d[1,2,3]`, but by reading it as `F(1)(2)(3)`, we can see its analogy to `d[1][2][3]`, and the notation `d[*x]`, which has no reason really to mean `d[(*x, )]`, could be for a counterpart of `f(*x)`. I can sense some naturality in the idea, but I understand it's not very straightforward. > 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. Best regards, Takuo _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7H76NRSWIMRNEY24CV7DF3RHTOX3ET2L/ Code of Conduct: http://python.org/psf/codeofconduct/