[Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)

Leo Soto M. leo.soto at gmail.com
Wed Aug 6 15:30:19 CEST 2008


On Tue, Aug 5, 2008 at 10:46 PM, Guido van Rossum <guido at python.org> wrote:
> On Tue, Aug 5, 2008 at 5:56 PM, Leo Soto M. <leo.soto at gmail.com> wrote:
> > But that's going to be easier if I understand the "why" and not only
> > the "how". I can live with a "no idea why" answer, though.
>
> Close -- I would have to do a lot of thinking, swapping in parts of my
> memory that have been gone for years. I say, follow CPython blindly
> and you can't go too wrong: even if the rules are arbitrary, they are
> what everyone expects.

Fair enough. It is going to be tricky with coercion (AFAIK, there is
no easy way to ask two java objects if they share the same method
implementation without resorting to reflection), but I'll do my best.

Thanks!
-- 
Leo Soto M.
http://blog.leosoto.com


More information about the Python-Dev mailing list