Context Managers (the with Statement) (incomplete)

TODO

  • dependency on “variables” is for the necessary explanation on reference counting and lifetime. work that out.

  • __enter__, __exit__

  • contextlib

cluster_python Python Programming: From Absolute Beginner to Advanced Productivity cluster_python_basics Python: The Language Fundamentals cluster_python_advanced Python: More Language Features cluster_python_advanced_oo Object Oriented Programming cluster_python_misc Python: Miscellaneous Topics python_basics_python_0200_sequential_types Sequential Datatypes python_basics_python_0150_datatypes_overview_compound Compound Datatypes python_basics_python_0200_sequential_types->python_basics_python_0150_datatypes_overview_compound python_basics_python_0120_helloworld Hello World python_basics_python_0110_blahblah Blahblah python_basics_python_0120_helloworld->python_basics_python_0110_blahblah python_basics_python_0270_functions Functions python_basics_python_0150_datatypes_overview Datatypes python_basics_python_0270_functions->python_basics_python_0150_datatypes_overview python_basics_python_0140_variables Variables python_basics_python_0270_functions->python_basics_python_0140_variables python_basics_python_0150_datatypes_overview->python_basics_python_0140_variables python_basics_python_0170_if The if Statement python_basics_python_0160_boolean Boolean python_basics_python_0170_if->python_basics_python_0160_boolean python_basics_python_0225_range The range Function python_basics_python_0225_range->python_basics_python_0200_sequential_types python_basics_python_0220_for for Loops python_basics_python_0225_range->python_basics_python_0220_for python_basics_python_0130_syntax_etc Syntax etc. python_basics_python_0140_variables->python_basics_python_0130_syntax_etc python_basics_python_0450_dictionaries More About Dictionaries python_basics_python_0450_dictionaries->python_basics_python_0220_for python_basics_python_0450_dictionaries->python_basics_python_0150_datatypes_overview_compound python_basics_python_0220_for->python_basics_python_0200_sequential_types python_basics_python_0193_while while Loops python_basics_python_0220_for->python_basics_python_0193_while python_basics_python_0193_while->python_basics_python_0170_if python_basics_python_0193_while->python_basics_python_0160_boolean python_basics_python_0160_boolean->python_basics_python_0150_datatypes_overview python_basics_python_0130_syntax_etc->python_basics_python_0120_helloworld python_basics_python_0150_datatypes_overview_compound->python_basics_python_0150_datatypes_overview python_advanced_closures Closures python_advanced_closures->python_basics_python_0270_functions python_advanced_python_1010_generators_yield Iteration, and Generators: the yield Keyword python_advanced_python_1010_generators_yield->python_basics_python_0200_sequential_types python_advanced_python_1010_generators_yield->python_basics_python_0270_functions python_advanced_python_1010_generators_yield->python_basics_python_0225_range python_advanced_python_1010_generators_yield->python_basics_python_0220_for python_advanced_starargs Positional and Keyword Arguments python_advanced_starargs->python_basics_python_0270_functions python_advanced_decorators Decorators python_advanced_decorators->python_basics_python_0270_functions python_advanced_decorators->python_advanced_closures python_advanced_decorators->python_advanced_starargs python_advanced_exceptions Exception Handling python_advanced_exceptions->python_basics_python_0270_functions python_advanced_exceptions->python_basics_python_0140_variables python_advanced_oo_basics Object Oriented Programming python_advanced_exceptions->python_advanced_oo_basics python_advanced_oo_basics->python_basics_python_0270_functions python_advanced_oo_basics->python_basics_python_0450_dictionaries python_misc_context_manager Context Managers (the with Statement) (incomplete) python_misc_context_manager->python_basics_python_0140_variables python_misc_context_manager->python_advanced_python_1010_generators_yield python_misc_context_manager->python_advanced_decorators python_misc_context_manager->python_advanced_exceptions