Skip to content

Use proper markup for the C "constants" #106919

Closed
@serhiy-storchaka

Description

@serhiy-storchaka

Many of the C "constants" (actually macros without parameters) are declared in the documentation using the data directive and referred using :data: and :const: roles. It is incorrect, because these directive and roles are defined in the Python domain and purposed to use with Python module level variables. I think that it is better to document them as they are, the C macros.

One of the differences is that the HTML anchors contains the c. prefix, e.g. c.METH_VARARGS. There may also be the difference in visual representation.

Other issues in the current markup:

  • In the index they are marked as "(built-in variable)".
  • There are no index entries for METH_KEYWORDS and METH_METHOD and they cannot be referred.
  • There are two definitions of Py_TPFLAGS_HAVE_GC. They does not conflict only because they are in different namespaces.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions