@@ -107,9 +107,9 @@ Context variable functions:
107107.. c :function :: PyObject *PyContextVar_New (const char *name, PyObject *def)
108108
109109 Create a new ``ContextVar `` object. The *name * parameter is used
110- for introspection and debug purposes. The *def * parameter may optionally
111- specify the default value for the context variable. If an error has
112- occurred, this function returns ``NULL ``.
110+ for introspection and debug purposes. The *def * parameter specifies
111+ a default value for the context variable, or `` NULL `` for no default.
112+ If an error has occurred, this function returns ``NULL ``.
113113
114114.. c :function :: int PyContextVar_Get (PyObject *var, PyObject *default_value, PyObject **value)
115115
@@ -124,13 +124,12 @@ Context variable functions:
124124 - the default value of *var *, if not ``NULL ``;
125125 - ``NULL ``
126126
127- If the value was found , the function will create a new reference to it .
127+ Except for `` NULL `` , the function returns a new reference.
128128
129129.. c :function :: PyObject *PyContextVar_Set (PyObject *var, PyObject *value)
130130
131- Set the value of *var * to *value * in the current context. Returns a
132- pointer to a :c:type: `PyObject ` object, or ``NULL `` if an error
133- has occurred.
131+ Set the value of *var * to *value * in the current context. Returns
132+ a new token object for this change, or ``NULL `` if an error has occurred.
134133
135134.. c :function :: int PyContextVar_Reset (PyObject *var, PyObject *token)
136135
0 commit comments