The interface assumes that a boolean is returned, but in the _IfStepper the return value is simply checked for being "truthy", meaning that incorrect types being returned can go by undetected. Instead, it should raise if the predicate callable returns a value that is not of bool type.
The interface assumes that a boolean is returned, but in the
_IfStepper
the return value is simply checked for being "truthy", meaning that incorrect types being returned can go by undetected. Instead, it should raise if the predicate callable returns a value that is not ofbool
type.