Stefan Krah added the comment:

I mean it's clearer to have:

    result = long_compare(self, other);
    return Py_cmp_to_bool(result, op);

than:

    result = long_compare(self, other);
    Py_RETURN_RICHCOMPARE(result, 0, op);


This is because in other places, like the proposed use
case in

  https://mail.python.org/pipermail/python-ideas/2015-March/032564.html ,


the macro actually *performs* the "rich" comparison. In the above case
it just *converts* the result of long_compare().


Maybe the distinction does not matter in practice, but I'm not
too happy with it.

----------

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

Reply via email to