On Jul 31, 2:02 pm, Jonathan Gardner <[email protected]> wrote: > On Jul 31, 10:44 am, Joshua Bronson <[email protected]> wrote: > > > Say I want to maintain a heap of (x, y) pairs sorted only by > > first coordinate. Without being able to pass key=itemgetter(0), won't > > heapifying a list of such pairs unnecessarily compare both > > coordinates? > > It will compare the second value only if the first values are equal.
I don't see how that helps. That's not at all the same thing as being able to pass key=itemgetter(0). -- http://mail.python.org/mailman/listinfo/python-list
