An iteration generator that allows the loop to modify the
        :class:`PatternSet` during the loop

def iter(self):
        """An iteration generator that allows the loop to modify the
        :class:`PatternSet` during the loop"""
        if self.patterns:
            patterns = list(self.patterns)
            for pattern in patterns:
                yield pattern