class A:

    def __init__(self):
        self.Blist = [B(True), B(False), B(True)]

def __iter__(self):
    nextB = iter(self.Blist)
for b_obj in nextB:
    if b_obj.is_bad():
        yield b_obj
a = A()
how to inquire an iterator in python without changing its pre-inquire state