diff options
author | Oleg Iarygin <oleg@arhadthedev.net> | 2022-04-19 20:01:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 20:01:09 (GMT) |
commit | e7e8a9fa4f7347bc82ea83ed82d447f447dfe325 (patch) | |
tree | 303de54cf782a4998c80c9d5257712018fd55f7e /Doc/extending | |
parent | a885f10325eb2fc27cd50ace5614666ea688ab66 (diff) | |
download | cpython-e7e8a9fa4f7347bc82ea83ed82d447f447dfe325.zip cpython-e7e8a9fa4f7347bc82ea83ed82d447f447dfe325.tar.gz cpython-e7e8a9fa4f7347bc82ea83ed82d447f447dfe325.tar.bz2 |
[3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec664c645ab744658d7e941d72e1a398)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes_tutorial.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/extending/newtypes_tutorial.rst b/Doc/extending/newtypes_tutorial.rst index 9049153..34c25d1 100644 --- a/Doc/extending/newtypes_tutorial.rst +++ b/Doc/extending/newtypes_tutorial.rst @@ -90,7 +90,7 @@ The second bit is the definition of the type object. :: static PyTypeObject CustomType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "custom.Custom", - .tp_doc = "Custom objects", + .tp_doc = PyDoc_STR("Custom objects"), .tp_basicsize = sizeof(CustomObject), .tp_itemsize = 0, .tp_flags = Py_TPFLAGS_DEFAULT, @@ -161,7 +161,7 @@ you will need to OR the corresponding flags. We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. :: - .tp_doc = "Custom objects", + .tp_doc = PyDoc_STR("Custom objects"), To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new` handler. This is the equivalent of the Python method :meth:`__new__`, but |