From c0a1a07c7e9814cad79cce3580c16284b2df7f52 Mon Sep 17 00:00:00 2001 From: Vinodhini Balusamy Date: Tue, 14 May 2019 22:11:41 +1000 Subject: bpo-32995 - Added context variable in glossary (GH-9741) --- Doc/glossary.rst | 9 +++++++++ .../next/Documentation/2018-10-07-03-04-57.bpo-32995.TXN9ur.rst | 1 + 2 files changed, 10 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2018-10-07-03-04-57.bpo-32995.TXN9ur.rst diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 9c64e48..d3ce365 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -225,6 +225,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 0000000..1df5eea --- /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. -- cgit v0.12