[issue23699] Add a macro to ease writing rich comparisons

Petr Viktorin report at bugs.python.org
Mon Mar 23 16:32:53 CET 2015


Petr Viktorin added the comment:

Changed the macro to Py_RETURN_RICHCOMPARE. This is not an expression, allowing the use of a switch statement. On the other hand, it's even larger macro than before now.

>From the discussion it seems that doing this correctly is tricky to do this correctly - another point for standardizing this.

I put everything in a single macro to ease review in Rietveld.

----------
Added file: http://bugs.python.org/file38657/Use-a-macro-to-reduce-boilerplate-in-rich-comparison.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23699>
_______________________________________


More information about the Python-bugs-list mailing list