On 15/12/20 10:49 pm, Paul Sokolovsky wrote:
the question is what semantic (not implementational!) shift happened in 3.7 (that's the point when it started to be compiled differently).
There was no semantic shift. The change had *nothing* to do with semantics. It was *purely* an optimisation. I'm not sure what we can say to make this any clearer.
I'm suggesting that there's difference between: expression <op> expression vs expression <op> (expression) Which is hopefully hard to disagree with.
There is *sometimes* a difference, depending on exactly what the two expressions are, and what <op> is.
Then I'm asking, how consistent are we with understanding and appreciating that difference, taking the example of: a.b() vs (a.b)()
There is no inconsistency. Note also that: 1 + 2 * 3 is the same as 1 + (2 * 3) because the default order of operations already has * evaluated before +. The same kind of thing is happening with a.b() vs (a.b)(). -- Greg _______________________________________________ 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/6GH7T3JJXMYT6QFW26IE4UFQTY5Z6XWV/ Code of Conduct: http://python.org/psf/codeofconduct/