.. _session_2_03: #################################################### Session 3: Context Managers, Itertools and functools #################################################### Reading ======= :ref:`context_managers` Supplemental Readings ===================== Context Managers ................ *Fluent Python:* Chapter 15: Context Managers and else Blocks https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/ https://pymotw.com/3/contextlib/ https://docs.python.org/3/library/contextlib.html Itertools ......... http://jmduke.com/posts/a-gentle-introduction-to-itertools/ https://pymotw.com/3/itertools/ http://www.diveintopython3.net/advanced-iterators.html Functools ......... https://pymotw.com/2/functools/ http://www.pydanny.com/python-partials-are-fun.html .. Multi-methods in Python .. ....................... .. GvR on Multi-methods .. http://www.artima.com/weblogs/viewpost.jsp?thread=101605 Exercises ========= :ref:`exercise_context_manager` Optional: :ref:`exercise_lambda_magic`