模数检查点保持器

class ModuloCheckpointKeeper(divisor: int = 10)[源代码]

基础:CheckpointKeeper

如果步骤可以被一个数字整除,则保留检查点。

属性摘要

divisor

方法总结

__call__(steps)

遍历应保留检查点的步骤。

属性文档

Parameters:

除数 (int)

divisor: int = 10

方法文档

__call__(steps: Sequence[int]) Iterator[int][源代码]

遍历应保留检查点的步骤。

Parameters:

steps (Sequence[int]) – 写入检查点的已排序步骤列表。

Yields:

应保留检查点的步骤

Return type:

Iterator[int]