On Thu, Dec 17, 2020 at 8:58 AM Paul Sokolovsky <[email protected]> wrote:
> Hello, > > On Thu, 17 Dec 2020 00:03:51 +0100 > Marco Sulla <[email protected]> wrote: > > > On Wed, 16 Dec 2020 at 20:18, Paul Sokolovsky <[email protected]> > > wrote: > > > But still, are there Python implementations which compile "(a.b)()" > > > faithfully, with its baseline semantic meaning? Of course > > > there're. > > > > OK, Paul, why don't you propose a PR and a bug report about it? > > But that's not what this talk is about! It's about a new exciting > (hmm, we'll see) feature which, turned out, was there all this time, > but was overlooked (so, no patches are needed right away). So, I'm > asking fellow Python programmers if they recognize it. If they do, we > can consider how to get more from that feature, and maybe some patches > will be useful. And if they don't, no patches would help. > > I like it. The idea of a 'method call operator' is quite cute, it's an alternate way of thinking about the situation that seems to be self-consistent (at least on the surface). BUT. It's only worth talking about alternate interpretations if there's a reasonable chance that introducing a new way of thinking about a problem will lead to some improvement: either functional enhancement, or better abstractions. Do you have concrete ideas about how treating this language construct as a new operator might end up bringing tangible benefits? Somewhat relatedly, I very much appreciate the simplicity and clean approach that Python takes with objects (experiencing Ruby briefly having written python made this benefit very clear). With python 3, the distinction between a function and a method has been further reduced, and any change that risks moving us away from `obj.meth()` being functionally equivalent to `getattr(obj, 'meth')()` or `getattr(Cls, 'meth')(obj)` would have to have incredibly strong benefits to outweigh the cost of doing so. Steve > > -- > Best regards, > Paul mailto:[email protected] > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/UF72G5Y7FIH4RIXRBDNRSQRJSTVAMQYA/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/ZS7JMEBOHIYSMWUQJUOVKSOFDFDWXN5V/ Code of Conduct: http://python.org/psf/codeofconduct/
