@contextmanager
def disable_overrides():
 prev = _OVERRIDES_DISABLED.disabled
 _OVERRIDES_DISABLED.disabled += (True,)
 (yield)
 _OVERRIDES_DISABLED.disabled = prev

@ contextmanager def disable_overrides ( ) : prev = _OVERRIDES_DISABLED . disabled _OVERRIDES_DISABLED . disabled += ( True , ) ( yield ) _OVERRIDES_DISABLED . disabled = prev
a context manager which disables field overrides inside the context of a with statement .