[Python-Dev] On __cmp__ specifications and implementation (to mimic it on Jython)
Guido van Rossum
guido at python.org
Wed Aug 6 04:46:25 CEST 2008
On Tue, Aug 5, 2008 at 5:56 PM, Leo Soto M. <leo.soto at gmail.com> wrote:
> On Tue, Aug 5, 2008 at 4:59 PM, Guido van Rossum <guido at python.org> wrote:
>> On Tue, Aug 5, 2008 at 1:56 PM, Leo Soto M. <leo.soto at gmail.com> wrote:
>>> On Tue, Aug 5, 2008 at 4:45 PM, Guido van Rossum <guido at python.org> wrote:
>>>> Given that in Python 3.0 __cmp__ is going away, I'm not sure how much
>>>> it all matters -- but if you care, as long as it's supported at all,
>>>> you might as well strive for the most compatibility with 2.5...
>>>
>>> Sure, it won't be a problem on Jython 3.0. But I'm doing this for the
>>> upcoming Jython 2.5, where we still have to live with __cmp__
>>
>> Which is why I recommend the closest possible compatibility. :-)
>
> Oh, right :)
>
> 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.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list