Adam Olsen wrote: > It's not clear to me how many distinct operations you'd need though, > or how acceptable reflections would be.
My intention was just to directly expose the tp_richcmp slot, so there would be six. To make things easier in the common case, there could perhaps be a utility function that would take a comparison operation code and a -1, 0, 1 value and return the appropriate boolean. Then a __richcmp__ method could be written very similarly to the way a __cmp__ method is now. It might even be possible for 2to3 to convert __cmp__ methods to __richcmp__ methods automatically. -- Greg _______________________________________________ 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