Hello,

On Tue, 15 Dec 2020 20:17:37 +1100
Chris Angelico <ros...@gmail.com> wrote:

> On Tue, Dec 15, 2020 at 8:04 PM Paul Sokolovsky <pmis...@gmail.com>
> wrote:
> > So, let's try simple yes/no questions:
> >
> > Example 1:
> >
> > a + b + c   vs   a + (b + c)
> >
> > Question 1:
> > Do you agree that there's a clear difference between left and right
> > expression? Yes/no.  
> 
> Yes, there is a difference.
> 
> > Example 2:
> >
> > a.b()   vs   (a.b)()
> >
> > Question 2:
> > Do you agree that there's a *similar* difference here as in Example
> > 1? Yes/no.  
> 
> No, there is no difference.
> 
> >
> > Then of course depending on the outcome of the last question, there
> > would be further questions. Specifically:
> >
> > If yes: How to put a solid formal basis behind the difference in
> > Example 2 (because so far we're just riding on the similarity with
> > Example 1). And how to explain it to wider audience?
> >  
> 
> Uhh, it's called precedence and associativity? You know that (a + b +
> c) is equivalent to ((a + b) + c), not to (a + (b + c)). Is that
> formal enough?

Yes. But you answered "no" to the Example 2. What makes you think that  
(a + b + c) is not equivalent to (a + (b + c)), but (a.b()) is
equivalent to ((a.b)()), that's what I'm asking.


> 
> 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/XXTXKADGXRDEEUSOHLQQ5SDWMOBIWN3P/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to