Skip to content

Commit 8b3823a

Browse files
bpo-32995 - Added context variable in glossary (GH-9741)
(cherry picked from commit c0a1a07) Co-authored-by: Vinodhini Balusamy <[email protected]>
1 parent d8e123a commit 8b3823a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Doc/glossary.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,15 @@ Glossary
221221
statement by defining :meth:`__enter__` and :meth:`__exit__` methods.
222222
See :pep:`343`.
223223

224+
context variable
225+
A variable which can have different values depending on its context.
226+
This is similar to Thread-Local Storage in which each execution
227+
thread may have a different value for a variable. However, with context
228+
variables, there may be several contexts in one execution thread and the
229+
main usage for context variables is to keep track of variables in
230+
concurrent asynchronous tasks.
231+
See :mod:`contextvars`.
232+
224233
contiguous
225234
.. index:: C-contiguous, Fortran contiguous
226235

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the context variable in glossary.

0 commit comments

Comments
 (0)