STINNER Victor added the comment: I see three options:
* avoid PyObject_RichCompareBool() which can run arbitrary Python code: this can be complicated since callbacks can be proxies, functools.partial, lambda, and other funny callable objects * reimplement the same algorithm than the Python implementation: create a new list. * do nothing: if you do weird things, it's your fault :-) My favorite option is to work on a new list. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28963> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com