8000 Docs: Argument Clinic: Improve 'How to write a custom converter' by erlend-aasland · Pull Request #107328 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Docs: Argument Clinic: Improve 'How to write a custom converter' #107328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to 8000
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't link to CConverter (yet)
  • Loading branch information
erlend-aasland committed Aug 4, 2023
commit 8bdf15196e56e9b163516a644fef57ae99eb4a70
4 changes: 2 additions & 2 deletions Doc/howto/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ See also :pep:`573`.
How to write a custom converter
-------------------------------

A converter is a Python class that inherits from :py:class:`CConverter`.
A converter is a Python class that inherits from :py:class:`!CConverter`.
The main purpose of a custom converter, is for parameters parsed with
the ``O&`` format unit --- parsing such a parameter means calling
a :c:func:`PyArg_ParseTuple` "converter function".
Expand All @@ -1364,7 +1364,7 @@ Apart for the *self* parameter, all additional :py:meth:`!converter_init`
parameters **must** be keyword-only.
Any arguments passed to the converter in Argument Clinic
will be passed along to your :py:meth:`!converter_init` method.
See :py:class:`CConverter` for a list of members you may wish to specify in
See :py:class:`!CConverter` for a list of members you may wish to specify in
your subclass.

.. module:: clinic
Expand Down
0