summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2017-07-15 18:15:56 -0700
committerGitHub <noreply@github.com>2017-07-15 18:15:56 -0700
commit8763d3e46468f89747e1fd6e147468852301a9a0 (patch)
treedfbfd9920c085b7cecab39919eca56522788c895 /docs
parentd45f41f7423ef9064b827ef4d4d72bd41fd875f9 (diff)
parenta6aadf3386410f7d008de4fe9a6976a334fff0ac (diff)
downloadpyramid-8763d3e46468f89747e1fd6e147468852301a9a0.tar.gz
pyramid-8763d3e46468f89747e1fd6e147468852301a9a0.tar.bz2
pyramid-8763d3e46468f89747e1fd6e147468852301a9a0.zip
Merge pull request #3127 from stevepiercy/master
Add more references about context manager and `with` statement
Diffstat (limited to 'docs')
-rw-r--r--docs/glossary.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/glossary.rst b/docs/glossary.rst
index 88be7f51d..7f1147fa1 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -1205,4 +1205,4 @@ Glossary
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`.
+ 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`. See also the Python documentation for :ref:`With Statement Context Managers <python:context-managers>` and :pep:`343`.