def __eq__(self, other):
        return (isinstance(other, self.__class__) and
                other.package == self.package)
def clear(self):
    for unused_ in range(len(self._items)):
      self.remove_item(self._items[0])