diff --git a/Doc/library/contextvars.rst b/Doc/library/contextvars.rst index b218468a084db1..b4009ac2065798 100644 --- a/Doc/library/contextvars.rst +++ b/Doc/library/contextvars.rst @@ -93,15 +93,17 @@ Context Variables # After the reset call the var has no value again, so # var.get() would raise a LookupError. + The same *token* cannot be used twice. + .. class:: Token *Token* objects are returned by the :meth:`ContextVar.set` method. They can be passed to the :meth:`ContextVar.reset` method to revert the value of the variable to what it was before the corresponding - *set*. + *set*. A single token cannot reset a context variable more than once. - The token supports :ref:`context manager protocol ` + Tokens support :ref:`context manager protocol ` to restore the corresponding context variable value at the exit from :keyword:`with` block::