Petr Viktorin added the comment:

Making it a function might help with the following issues:
- series of comparisons and PyBool_FromLong is less efficient than switch and 
Py_RETURN_*. But it would add a function call.
- it might be too complex for a macro

Do you think that would help?

As for the signature, I would like this to mirror richcmpfunc and 
PyObject_RichCompareBool. And returning PyObjexct*, not 0/1, is an important 
part of reducing boilerplate; in cases where 0/1 would be helpful you can 
easily work with cmp-style -1/0/1 values before using this to convert them.

----------

_______________________________________
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