我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用collections.MutableMapping.itervalues()。
def clear(self): with self.lock: # Copy pointers to all values, then wipe the mapping values = list(itervalues(self._container)) self._container.clear() if self.dispose_func: for value in values: self.dispose_func(value)
def clear(self): 'od.clear() -> None. Remove all items from od.' try: for node in self.__map.itervalues(): del node[:] self.__root[:] = [self.__root, self.__root, None] self.__map.clear() except AttributeError: pass dict.clear(self)