harold fellermann <[EMAIL PROTECTED]> writes:
> Thank you Greg,
>
> I figured most of it out in the meantime, myself. I only differ
> from you in one point.
>
>>> What has to be done, if the function is invoked for an operator
>>> I don't want to define?
>>
>> Return Py_NotImplemented. (Note that'
Thank you Greg,
I figured most of it out in the meantime, myself. I only differ
from you in one point.
What has to be done, if the function is invoked for an operator
I don't want to define?
Return Py_NotImplemented. (Note that's return, *not* raise.)
I used
PyErr_BadArgument();
return NULL;
instea
harold fellermann wrote:
richcmpfunc compare(PyObject *,PyObject, int);
I supposed the two objects passed are the ones to be compared.
Yes.
What is the meaning of the integer argument? Does it specify the kind
of comparision operator (e.g. __eq__ or __le__), and if so, how?
< 0
Hi all,
I want to implement rich comparision in an extension class. Problem is
I cannot
find good documentation of the richcmpfunc semantics. Given the
signature
richcmpfunc compare(PyObject *,PyObject, int);
I supposed the two objects passed are the ones to be compared.
What is the meaning of