@@ -260,8 +260,10 @@ accessible to C code. They all work with the current interpreter thread's
260260
261261.. c:function:: PyObject *PySys_GetAttr(PyObject *name)
262262
263- Get the attribute *name * of the :mod: `sys ` module. Return a :term: `strong reference `.
264- Raise :exc: `RuntimeError ` and return ``NULL `` if it does not exist.
263+ Get the attribute *name * of the :mod: `sys ` module.
264+ Return a :term: `strong reference `.
265+ Raise :exc: `RuntimeError ` and return ``NULL `` if it does not exist or
266+ if the :mod: `sys ` module cannot be found.
265267
266268 If the non-existing object should not be treated as a failure, you can use
267269 :c:func: `PySys_GetOptionalAttr ` instead.
@@ -279,21 +281,21 @@ accessible to C code. They all work with the current interpreter thread's
279281
280282 .. versionadded :: next
281283
282- .. c :function :: int PySys_GetOptionalAttr (PyObject *name, PyObject **result);
284+ .. c :function :: int PySys_GetOptionalAttr (PyObject *name, PyObject **result)
283285
284286 Variant of :c:func: `PySys_GetAttr ` which doesn't raise
285287 exception if the object does not exist.
286288
287- If the object exists, set *\* result * to a new :term: `strong reference `
288- to the object and return ``1 ``.
289- If the object does not exist, set *\* result * to ``NULL `` and return ``0 ``,
290- without setting an exception .
291- If other error occurred, set an exception, set *\* result * to ``NULL `` and
292- return `` -1 `` .
289+ * Set *\* result * to a new :term: `strong reference ` to the object and
290+ return ``1 `` if the object exists .
291+ * Set *\* result * to ``NULL `` and return ``0 `` without setting an exception
292+ if the object does not exist .
293+ * Set an exception, set *\* result * to ``NULL ``, and return `` -1 ``,
294+ if an error occurred .
293295
294296 .. versionadded :: next
295297
296- .. c :function :: int PySys_GetOptionalAttrString (const char *name, PyObject **result);
298+ .. c :function :: int PySys_GetOptionalAttrString (const char *name, PyObject **result)
297299
298300 This is the same as :c:func: `PySys_GetOptionalAttr `, but *name * is
299301 specified as a :c:expr: `const char* ` UTF-8 encoded bytes string,
0 commit comments