On Jul 31, 10:44 am, Joshua Bronson <jabron...@gmail.com> 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. -- http://mail.python.org/mailman/listinfo/python-list