Lennart Regebro wrote:
> It never gets to that root comparison, as several of that types
> comparisons just refer back to the type who returns NotImplemented. To
> solve it you need to never refer to the other type in your
> comparisons. And as far as I see that makes it impossible to implement
> full comparisons with only one operator implemented.

Ah, OK, I'd missed the complication where the translations could reverse
the order of the arguments.

I'd suggest two things: putting comments on the recipes pointing out
they're vulnerable to infinite recursion if mixed with other types and
raising an issue on the tracker pointing back to this thread.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to