On Mon, 6 Jun 2016 02:24:37 +1000, Chris Angelico <ros...@gmail.com> wrote: > On Sun, Jun 5, 2016 at 4:53 PM, ICT Ezy <ict...@gmail.com> wrote: >>>>> 2 ** 3 ** 2 >> Answer is 512 >> Why not 64? >> Order is right-left or left-right? > > This example follows the mathematical standard; you start from the > "top" (the right hand side), and work your way down. [snip]
This is almost certainly why top-down was the desirable choice. And as for why mathematicians chose top-down (probably long before any programming-language designer faced the decision), note that this convention allows you to write both (a**b)**c and a**(b**c) without parentheses, making expressions cleaner than otherwise: bc (a**b)**c = a c b a**(b**c) = a -- To email me, substitute nowhere->runbox, invalid->com. -- https://mail.python.org/mailman/listinfo/python-list