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;
instead. What is the difference between the two and which one is to prefer. Also, do you need to increment the reference count of Py_NotImeplemented before returning it?
Thanks,
- harold -
-- I like pigs. Dogs look up to us. Cats look down to us. Pigs treat us as equal. -- Winston Churchill
-- http://mail.python.org/mailman/listinfo/python-list