Context manager for managing changes to state.

This context manager provides two functions: - Make a group of assignments to state atomically: if an exception occurs, all changes will be rolled back. - Renders changes to the state upon successful completion.

Note that this context manager will not keep track of changes to mutable objects.


ignored_variables (Optional[Sequence[str]]) – an optional sequence of variables for the manager to ignore. These changes will not be reverted upon exception.