My suggestion was to set the default on line 24, like for for inverse_match. This could then be something like:
```
if flags is not None:
    self.flags = flags
if flags and not is instance ...:
    raise TypeError
```