[docs] [issue16239] PEP8 arithmetic operator examples

Serhiy Storchaka report at bugs.python.org
Thu Oct 25 19:41:16 CEST 2012


Serhiy Storchaka added the comment:

>-      x = x * 2 - 1
>-      hypot2 = x * x + y * y

Why you remove this?

>-      c = (a+b) * (a-b)
>+      c = a+b * a-b

This changes the semantic.

>but otoh 'x*2 - 1' is a better alternative.

Can you justify this?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16239>
_______________________________________


More information about the docs mailing list