Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix inline literals
  • Loading branch information
Erlend E. Aasland committed Dec 28, 2020
commit dedc1150ddce380e9daa266c7e24597c1df4f1d8
16 changes: 8 additions & 8 deletions Doc/howto/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ Using a "defining class" converter

Argument Clinic facilitates gaining access to the defining class of a method.
This is useful for heap type methods that need to fetch module level state.
Example from `Modules/zlibmodule.c`::
Example from ``Modules/zlibmodule.c``::

/*[clinic input]
zlib.Compress.compress
Expand All @@ -1229,15 +1229,15 @@ Example from `Modules/zlibmodule.c`::


Each method may only have one argument using this converter, and it must appear
after `self`, or, if `self` is not used, as the first argument. The argument
will be of type `PyTypeObject *`.
after ``self``, or, if ``self`` is not used, as the first argument. The argument
will be of type ``PyTypeObject *``.

When used, Argument Clinic will select `METH_FASTCALL | METH_KEYWORDS |
METH_METHOD` as the calling convention. The argument will not appear in
`__text_signature__`.
When used, Argument Clinic will select ``METH_FASTCALL | METH_KEYWORDS |
METH_METHOD`` as the calling convention. The argument will not appear in
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
``__text_signature__``.

The `defining_class` converter is not compatible with `__init__` and `__new__`
methods, which cannot use the `METH_METHOD` convention.
The ``defining_class`` converter is not compatible with ``__init__`` and ``__new__``
methods, which cannot use the ``METH_METHOD`` convention.
Comment thread
erlend-aasland marked this conversation as resolved.

See also PEP 573.
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated

Expand Down