Thanks, that looks like Mike's solution except that it uses the built-in heapq module.
While this one contains less code than Mike's solution it seems to lack the ability to control the comparison operation, which means it won't work in my case. I need to both be able to sort on an arbitrary field name (could be done using a list where I place the field first), and also to be able to sort in a different order than smallest-first. Perhaps by adjusting the data that is returned through each source would do that. I'll look into it. -- http://mail.python.org/mailman/listinfo/python-list