mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-93738: Documentation C syntax (:c:type:PyTypeObject* -> :c:expr:PyTypeObject*) (#97778)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This commit is contained in:
parent
db64fb9bbe
commit
c70c8b6976
2 changed files with 2 additions and 2 deletions
|
|
@ -310,7 +310,7 @@ Object Protocol
|
||||||
is equivalent to the Python expression ``type(o)``. This function increments the
|
is equivalent to the Python expression ``type(o)``. This function increments the
|
||||||
reference count of the return value. There's really no reason to use this
|
reference count of the return value. There's really no reason to use this
|
||||||
function instead of the :c:func:`Py_TYPE()` function, which returns a
|
function instead of the :c:func:`Py_TYPE()` function, which returns a
|
||||||
pointer of type :c:type:`PyTypeObject*`, except when the incremented reference
|
pointer of type :c:expr:`PyTypeObject*`, except when the incremented reference
|
||||||
count is needed.
|
count is needed.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
|
||||||
Equivalent to calling the Python class
|
Equivalent to calling the Python class
|
||||||
:class:`types.GenericAlias`. The *origin* and *args* arguments set the
|
:class:`types.GenericAlias`. The *origin* and *args* arguments set the
|
||||||
``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively.
|
``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively.
|
||||||
*origin* should be a :c:type:`PyTypeObject*`, and *args* can be a
|
*origin* should be a :c:expr:`PyTypeObject*`, and *args* can be a
|
||||||
:c:expr:`PyTupleObject*` or any ``PyObject*``. If *args* passed is
|
:c:expr:`PyTupleObject*` or any ``PyObject*``. If *args* passed is
|
||||||
not a tuple, a 1-tuple is automatically constructed and ``__args__`` is set
|
not a tuple, a 1-tuple is automatically constructed and ``__args__`` is set
|
||||||
to ``(args,)``.
|
to ``(args,)``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue