On 21/03/2016 17:31, BartC wrote:
(While I here, something that came up yesterday: why hasn't Python fixed the bug it seems to have inherited from C, where: a << b + c is evaluated as 'a << (b+c)'? That cost me half an hour to sort out! << and >> scale numbers just like * and /, so should have the same precedence.)
Python is not C. This is not a bug. The rules are here https://docs.python.org/3/reference/expressions.html#operator-precedence
-- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list