def __iter__ ( self ) : for bit , mask in zip ( self . _bits , self . _mask ) : yield bit if mask else None
python iterator with conditional
Overloads iter ( condition ) and also for bit in condition . The values yielded by the iterator are True ( 1 ) False ( 0 ) or None ( # ) .
def __iter__(self):
        """Overloads iter(condition), and also, for bit in condition. The
        values yielded by the iterator are True (1), False (0), or
        None (#)."""
        for bit, mask in zip(self._bits, self._mask):
            yield bit if mask else None