Ezio Melotti added the comment:

> >-      x = x * 2 - 1
> >-      hypot2 = x * x + y * y
>
> Why you remove this?

As I explained in my previous message, even if valid, these are IMHO less clear 
than x*2 - 1 and x*x + y*y.

> >-      c = (a+b) * (a-b)
> >+      c = a+b * a-b
>
> This changes the semantic.

It does indeed, but I think it's worth pointing out that misleading spacing 
should be avoided.  Maybe a different example could be used.

> >but otoh 'x*2 - 1' is a better alternative.
>
> Can you justify this?

x*2 - 1  gives a visual hint of what gets executed first,
x * 2-1  gives a wrong/misleading hint of what gets executed first,
x * 2 - 1 gives no hint at all.

I think that providing the correct hint is better than not providing any hints 
(and clearly better than providing the wrong hint!).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to