summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2017-07-03 20:24:49 -0700
committerSteve Piercy <web@stevepiercy.com>2017-07-03 20:24:49 -0700
commit83a1c2a06f986fef1cdc3280b9d51310e071b298 (patch)
tree25f226385b4a142b0c4cb9a208de6f5aadbb6fbe
parent34eb9f4b60df183c88d9efd104136d448b494124 (diff)
downloadpyramid-83a1c2a06f986fef1cdc3280b9d51310e071b298.tar.gz
pyramid-83a1c2a06f986fef1cdc3280b9d51310e071b298.tar.bz2
pyramid-83a1c2a06f986fef1cdc3280b9d51310e071b298.zip
Add term "context manager"
-rw-r--r--docs/glossary.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/glossary.rst b/docs/glossary.rst
index fe2d0977c..de68085d9 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -1203,3 +1203,6 @@ Glossary
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 :func:`pyramid.testing.testConfig`, :func:`pyramid.scripting.prepare`, and :class:`pyramid.config.Configurator`. \ No newline at end of file