As I wrote before, I think a multi-getter FUNCTION is a useful thing. In
fact, I linked to several libraries that provide variations on the idea.

But there are a number of choice to make about the behavior of that, and
absolutely no reason it needs to be in the standard library, let alone a
method on common collections, and still less dedicated syntax

On Sat, Sep 4, 2021, 2:06 PM Brendan Barnwell <brenb...@brenbarn.net> wrote:

> On 2021-09-04 05:47, Matsuoka Takuo wrote:
> > On Sat, 4 Sept 2021 at 16:33, Brendan Barnwell <brenb...@brenbarn.net>
> 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
> _______________________________________________
> 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/KPMACJKK23CNDDQYGSGVMZEBFRFHHQWK/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/4PAY5P5F2MEBSBDVY35VQZBX7X6XSCKG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to