Daniel Stutzbach wrote:

> I apologize if this is a silly question, but what would be the
> difference between the proposed __richcmp__ and the old __cmp__ that's
> being removed?

__richcmp__ would have the same signature as the C-level
tp_richcmp slot, i.e. taking a code indicating which
comparison to perform, and returning an arbitary value
instead of -1, 0, 1.

With this, you would be able to do anything that could
be done with __lt__, __eq__, etc., but only have to
override a single method.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,          | Carpe post meridiem!                 |
Christchurch, New Zealand          | (I'm not a morning person.)          |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
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