From d76b5f827398520d2d80a96eb38cfb26baaf4188 Mon Sep 17 00:00:00 2001 From: Michael Merickel <michael@merickel.org> Date: Thu, 13 Jul 2017 03:19:21 +0200 Subject: [PATCH] Merge pull request #3126 from mmerickel/backport-3119-to-1.9-branch --- docs/glossary.rst | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/docs/glossary.rst b/docs/glossary.rst index 54a9f83..88be7f5 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1203,3 +1203,6 @@ side effect A statement or function has a side effect when it changes a value outside its own scope. Put another way, if one can observe the change made by a function from outside that function, it has a side effect. + + context manager + A context manager is an object that defines the runtime context to be established when executing a :ref:`with <python:with>` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :class:`pyramid.config.Configurator`, :meth:`pyramid.interfaces.IRouter.request_context`, :func:`pyramid.paster.bootstrap`, :func:`pyramid.scripting.prepare`, and :func:`pyramid.testing.testConfig`. -- Gitblit v1.9.3