From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 14 May 2019 12:24:42 +0000 (-0700) Subject: bpo-32995 - Added context variable in glossary (GH-9741) X-Git-Tag: v3.7.4rc1~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b3823ae16d68cf17ad037e46d7e49d26929a13b;p=thirdparty%2FPython%2Fcpython.git bpo-32995 - Added context variable in glossary (GH-9741) (cherry picked from commit c0a1a07c7e9814cad79cce3580c16284b2df7f52) Co-authored-by: Vinodhini Balusamy --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 9ca46222ad9b..b6ab28617d14 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -221,6 +221,15 @@ Glossary statement by defining :meth:`__enter__` and :meth:`__exit__` methods. See :pep:`343`. + context variable + A variable which can have different values depending on its context. + This is similar to Thread-Local Storage in which each execution + thread may have a different value for a variable. However, with context + variables, there may be several contexts in one execution thread and the + main usage for context variables is to keep track of variables in + concurrent asynchronous tasks. + See :mod:`contextvars`. + contiguous .. index:: C-contiguous, Fortran contiguous diff --git a/Misc/NEWS.d/next/Documentation/2018-10-07-03-04-57.bpo-32995.TXN9ur.rst b/Misc/NEWS.d/next/Documentation/2018-10-07-03-04-57.bpo-32995.TXN9ur.rst new file mode 100644 index 000000000000..1df5eeaa965a --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-10-07-03-04-57.bpo-32995.TXN9ur.rst @@ -0,0 +1 @@ +Added the context variable in glossary.