Stefan Behnel <stefan...@behnel.de> added the comment:

> cmp(a,b) can be replaced with (a>b)-(a<b)

That is assuming that "a > b" and "a < b" both return something that supports 
the minus operator, such as a boolean value. That might not be the case, and it 
is definitely impossible to infer automatically from a given piece of code.

Besides, even if the transformation happens to be correct in a given case, the 
result is definitely also very difficult to read and understand. IMHO, "but it 
keeps working" isn't enough of an argument here.

----------
nosy: +scoder

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

Reply via email to