Hello, On Tue, 15 Dec 2020 20:18:11 +1100 Chris Angelico <ros...@gmail.com> wrote:
> On Tue, Dec 15, 2020 at 8:08 PM Paul Sokolovsky <pmis...@gmail.com> > wrote: > > > > Hello, > > > > On Mon, 14 Dec 2020 02:17:52 -0500 > > David Mertz <me...@gnosis.cx> wrote: > > > > > On Sun, Dec 13, 2020, 5:11 PM Paul Sokolovsky d > > > > > > > a + b + c vs a + (b + c) > > > > > > > > Here, there's even no guarantee of the same result, if we have > > > > user objects with weirdly overloaded __add__(). > > > > > > > > > > 0.1 + 0.2 + 0.3 != 0.1 + (0.2 + 0.3) > > > > > > Right, thanks. But the original question was about somewhat > > different matter: if you agree that there's difference between "a + > > b + c" vs "a + (b + c)", do you agree that there's a similar in > > nature difference with "a.b()" vs "(a.b)()"? If no, then why? If > > yes, then how to explain it better? (e.g. to Python novices). > > > > https://docs.python.org/3/reference/expressions.html#operator-precedence No worries, that table is not complete. For example, "," (comma) is a (context-dependent) operator in Python, yet that table doesn't have explicit entry for it. Unary "*" and "**" are other context-dependent operators. (Unary "@" too.) > > ChrisA -- Best regards, Paul mailto:pmis...@gmail.com _______________________________________________ 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/344LG23UBZWOQMQTDEHXEZSUNGSO3ETO/ Code of Conduct: http://python.org/psf/codeofconduct/