[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

Ayush report at bugs.python.org
Sun May 6 10:28:15 EDT 2018


Ayush <ayushgoyal.iitkgp at gmail.com> added the comment:

I believe 2to3 should be able to replicate the same results of cmp function in python 3 too. I can create a PR which will allow the library to handle it. 

For example, a function call cmp(a,b) can be replaced with (a>b)-(a<b) . 

I can send a pull request for this change if this is Ok.

----------
nosy: +defcon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32915>
_______________________________________


More information about the Python-bugs-list mailing list