On Thu, Feb 24, 2011 at 9:41 AM, Jeremy wrote:
> I recently found the wiki page on sorting
> (http://wiki.python.org/moin/HowTo/Sorting/). This page describes the new
> key parameter to the sort and sorted functions.
>
> What about custom objects? Can I just write __lt__, __gt__, etc. function
On Thu, Feb 24, 2011 at 8:41 AM, Jeremy wrote:
> I recently found the wiki page on sorting
> (http://wiki.python.org/moin/HowTo/Sorting/). This page describes the new
> key parameter to the sort and sorted functions.
>
> What about custom objects? Can I just write __lt__, __gt__, etc. function
Sorry for double posting. Google Groups was acting funny this morning.
--
http://mail.python.org/mailman/listinfo/python-list
I recently found the wiki page on sorting
(http://wiki.python.org/moin/HowTo/Sorting/). This page describes the new key
parameter to the sort and sorted functions.
What about custom objects? Can I just write __lt__, __gt__, etc. functions and
not have to worry about the key parameter? Is t