+ 2

Guys...just use parenthesis instead of worrying about all these operator-precedences xD

15th Jan 2017, 10:25 AM
Diego
Diego - avatar
5 Respostas
+ 9
But you stil have to know it, because you can have to read code written by other coders who did not use parentheses. And it is known that we usually spend more time reading code than writing it. So we should care to write code which is more "readable" (not about "how to write easier, faster even if it is harder to read later").
29th Jan 2017, 5:04 AM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar
+ 2
You are right, that would be easier / clearer. However I think one can read the code faster without the parentheses and with the operator precedence in mind.
19th Jan 2017, 6:46 AM
CodingForFun
CodingForFun - avatar
0
It would be easier
25th Jan 2017, 8:46 PM
Atiwiex
0
I find parentheses way easier.
2nd Feb 2017, 8:51 PM
Mateo
0
Well I am beginner in python but all my code must be 100% pep8.... No parenthesis allowed then (only when necessary)
5th Feb 2017, 1:27 AM
s3i