Message243481
| Author | skrah |
|---|---|
| Recipients | barry, ethan.furman, lemburg, petr.viktorin, rhettinger, serhiy.storchaka, skrah |
| Date | 2015-05-18.14:23:57 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1431959037.49.0.0836539278623.issue23699@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-05-18 14:23:57 | skrah | set | recipients: + skrah, lemburg, barry, rhettinger, petr.viktorin, ethan.furman, serhiy.storchaka |
| 2015-05-18 14:23:57 | skrah | set | messageid: <1431959037.49.0.0836539278623.issue23699@psf.upfronthosting.co.za> |
| 2015-05-18 14:23:57 | skrah | link | issue23699 messages |
| 2015-05-18 14:23:57 | skrah | create | |