Python contextlib Functions

EditRocket provides the following information on contextlib functions in the Python source code builder.

closing(thing) - Return a context manager that closes thing upon completion of the block.

contextmanager(func) - This function is a decorator that can be used to define a factory function for with statement context managers, without needing to create a class or separate __enter__() and __exit__() methods.