def __popn_key(self, n):
        """popn(n): pops and return the n smallest items from the heap, maintaining
        the heap invariant. If the heap becomes empty, IndexError is raised."""
        self__heap = self._heap
        return [heappop(self__heap)[2] for _ in xrange(n)]
popn(n): pops and return the n smallest items from the heap, maintaining
        the heap invariant. If the heap becomes empty, IndexError is raised.
recipes/Python/502295_Heap_a_heapq_wrapper_class/recipe-502295.py