mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
b478c5e50c
commit
d7a7883326
8 changed files with 24 additions and 18 deletions
|
@ -296,7 +296,7 @@ An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` table
|
|||
descriptors that are used at runtime is that any attribute defined this way can
|
||||
have an associated doc string simply by providing the text in the table. An
|
||||
application can use the introspection API to retrieve the descriptor from the
|
||||
class object, and get the doc string using its :attr:`__doc__` attribute.
|
||||
class object, and get the doc string using its :attr:`!__doc__` attribute.
|
||||
|
||||
As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :c:member:`~PyMethodDef.ml_name` value
|
||||
of ``NULL`` is required.
|
||||
|
@ -448,7 +448,7 @@ instance of your data type. Here is a simple example::
|
|||
return result;
|
||||
}
|
||||
|
||||
:c:type:`Py_hash_t` is a signed integer type with a platform-varying width.
|
||||
:c:type:`!Py_hash_t` is a signed integer type with a platform-varying width.
|
||||
Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error,
|
||||
which is why you should be careful to avoid returning it when hash computation
|
||||
is successful, as seen above.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue