Skip to content

gh-148961 : Use parsed-literal for the slot column legend in c-api/typeobj.rst#148962

Open
Chang-LeHung wants to merge 1 commit intopython:mainfrom
Chang-LeHung:fix-issue-148961
Open

gh-148961 : Use parsed-literal for the slot column legend in c-api/typeobj.rst#148962
Chang-LeHung wants to merge 1 commit intopython:mainfrom
Chang-LeHung:fix-issue-148961

Conversation

@Chang-LeHung
Copy link
Copy Markdown
Contributor

@Chang-LeHung Chang-LeHung commented Apr 24, 2026

The two small legends under the PyTypeObject "Quick Reference" table in
Doc/c-api/typeobj.rst explain what each character in the "D" (default)
and "I" (inheritance) columns means. They were wrapped in
.. code-block:: none, so reST inline markup inside them was rendered
verbatim:

  • *PyType_Ready* and *NULL* showed literal asterisks.
  • PyType_Ready was plain text instead of a cross-reference link.
  • NULL was plain text instead of the NULL inline literal used
    throughout the rest of the page.

Before:

image

After:

Clipboard_Screenshot_1777045193

📚 Documentation preview 📚: https://cpython-previews--148962.org.readthedocs.build/

Comment thread Doc/c-api/typeobj.rst
**"D"**: default (if slot is set to ``NULL``)

.. code-block:: none
.. parsed-literal::
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These break translations, see #135828.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants