Guido van Rossum wrote:
> That's a different issue altogether (and your wish is not likely going
> to be granted unless you write a PEP).

You could write and implement a PEP about exposing the tp_richcompare
slot to Python code.

import sys

class Example:
    def __richcmp__(self, other: object, op: int) -> bool:
        if op == sys.CMP_EQ:
            return self.value == other.value
        ...

Christian
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to