def iterate(cls, func): '''Returns each idaapi.BasicBlock for the function ``func``.''' fn = by(func) fc = idaapi.FlowChart(f=fn, flags=idaapi.FC_PREDS) for bb in fc: yield bb return