PyDocs

Nav

Concurrent Execution

Token

Token objects are returned by the ContextVar.set() method. They can be passed to the ContextVar.reset() method to revert the value of the variable to what it was before the corresponding set. A single token cannot reset a context variable more than once.
Changed in 3.14
  • 3.14: Added support for usage as a context manager.
Members of Token

m

MISSING
A marker object used by Token.old_value.

o

old_value
A read-only property.

v

var
A read-only property.
0 Examples
No examples for contextvars/Token.
See Also
No see-alsos for contextvars/Token
0 Notes
No notes for Token