I\'m defining a Debug class like so:
_debug = False class Debug: DrawOutlines = True InvinciblePlayer = True
I want to override th
You override __getattribute__ to intercept all attribute access, or __getattr__ to get called only for attributes that do not exist:
__getattribute__
__getattr__
_debug = True class A(object): def __getattribute__(self, attr): if _debug: print attr return object.__getattribute__(self, attr)