satella.coding.
EmptyContextManager
A context manager that does nothing. Only to support conditional change of context managers, eg in such a way:
>>> if tx_enabled: >>> ctxt = transaction.atomic >>> else: >>> ctxt = EmptyContextManager() >>> with ctxt: >>> ...
Contents