mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.13] gh-141004: Document the PyDoc_VAR macro (GH-141263) (GH-141265)
gh-141004: Document the `PyDoc_VAR` macro (GH-141263)
(cherry picked from commit 545299773b)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
parent
10d44f72e5
commit
2a300e3642
1 changed files with 10 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ complete listing.
|
|||
|
||||
.. c:macro:: PyDoc_STRVAR(name, str)
|
||||
|
||||
Creates a variable with name ``name`` that can be used in docstrings.
|
||||
Creates a variable with name *name* that can be used in docstrings.
|
||||
If Python is built without docstrings, the value will be empty.
|
||||
|
||||
Use :c:macro:`PyDoc_STRVAR` for docstrings to support building
|
||||
|
|
@ -279,6 +279,15 @@ complete listing.
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
.. c:macro:: PyDoc_VAR(name)
|
||||
|
||||
Declares a static character array variable with the given name *name*.
|
||||
|
||||
For example::
|
||||
|
||||
PyDoc_VAR(python_doc) = PyDoc_STR("A genus of constricting snakes in the Pythonidae family native "
|
||||
"to the tropics and subtropics of the Eastern Hemisphere.");
|
||||
|
||||
|
||||
.. _api-objects:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue