diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/typeobj.rst | 3 | ||||
-rw-r--r-- | Doc/extending/newtypes.rst | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 2c448a0211..25e6c83153 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -116,7 +116,8 @@ type objects) *must* have the :attr:`ob_size` field. If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the :attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined (unless explicitly set in the dictionary, as explained above). This means your - type will be impossible to pickle. + type will be impossible to pickle. Additionally, it will not be listed in + module documentations created with pydoc. This field is not inherited by subtypes. diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index a69f114fe4..4a6e26cf2a 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -129,7 +129,9 @@ our objects and in some error messages, for example:: Note that the name is a dotted name that includes both the module name and the name of the type within the module. The module in this case is :mod:`noddy` and -the type is :class:`Noddy`, so we set the type name to :class:`noddy.Noddy`. :: +the type is :class:`Noddy`, so we set the type name to :class:`noddy.Noddy`. +One side effect of using an undotted name is that the pydoc documentation tool +will not list the new type in the module documentation. :: sizeof(noddy_NoddyObject), /* tp_basicsize */ |