[docs] Please add note for operator precedence

Jacek Pliszka jacek.pliszka at gmail.com
Wed Jul 9 15:00:00 CEST 2014


Hi!

Lawrence D'Oliveiro
<https://www.linkedin.com/profile/view?id=287199707&goback=%2Egde_25827_member_5892214849378729987>
in his linkedin post noticed that operator precedence for bitwise ops and
comparisions is reversed in Python
with respect to C:

e.g. compare & and == in Python:

https://docs.python.org/2/reference/expressions.html#operator-precedence

and in C:

http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B

I believe it is worth to add comment about this in python docs:

https://docs.python.org/2/reference/expressions.html#operator-precedence

and:

https://docs.python.org/3/reference/expressions.html#operator-precedence

What do you think?

Best Regards,

Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20140709/c75bd560/attachment.html>


More information about the docs mailing list