On 26/01/2010 12:22, Nick Coghlan wrote:
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.

Note that the mail archives for this list are corrupted and not being updated [1], so any link will need to be to gmane (or equivalent) rather than the usual archive on mail.python.org.

All the best,

Michael

[1] http://mail.python.org/pipermail/python-dev/2010-January/thread.html


Cheers,
Nick.



--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of 
your employer, to release me from all obligations and waivers arising from any 
and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, 
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and 
acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your 
employer, its partners, licensors, agents and assigns, in perpetuity, without 
prejudice to my ongoing rights and privileges. You further represent that you 
have the authority to release me from any BOGUS AGREEMENTS on behalf of your 
employer.


_______________________________________________
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