I know it does not solve anything (we can always assign freely), but I think that we could have a setter wrapper and get used to use it to set the flags. This way we can discourage direct assignment (which we cannot avoid, but at least we can make the future us think twice).

Something like:

```python
 47 def set_flag(flag, value):
 48     globals()[flag].set_flag(value)
```