[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: Would there be support for a more general cmp/__cmp__
From: Antoon Pardon <apardon () forel ! vub ! ac ! be>
Date: 2005-10-31 8:56:09
Message-ID: slrndmbn19.1n4.apardon () rcpc42 ! vub ! ac ! be
[Download RAW message or body]
Op 2005-10-28, Ron Adam schreef <rrr@ronadam.com>:
>
> I haven't heard he was removing __cmp__,
I read somewhere he was considering it.
> but I would think the sort or
> sorted functions would just use the available comparisons methods or
> equivalent C code for base types. So I expect it would only matter if
> you need a custom or modified sort.
>
> Although It is a thought that these cases could be improved by making
> the sort value available to the underlying C sort function. Something
> on the order of:
>
> __sortvalue__ == self.value.
I doubt that will be possible in general. You can't even calculate such
a __sortvalue__ for lists.
--
Antoon Pardon
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic