'Remove and return the oldest item, or :const:`None` when empty.'

def pop(self, default=None):

    while self._heap:
        (_, item) = heappop(self._heap)
        try:
            self._data.pop(item)
        except KeyError:
            pass
        else:
            return item
    return default
