Tool that can document private inner class?

Weatherby,Gerard gweatherby at uchc.edu
Wed Feb 8 09:25:59 EST 2023


No.

I interpreted your query as “is there something that can read docstrings of dunder methods?”

Have you tried the Sphinx specific support forums? https://www.sphinx-doc.org/en/master/support.html

From: Ian Pilcher <arequipeno at gmail.com>
Date: Tuesday, February 7, 2023 at 4:01 PM
To: Weatherby,Gerard <gweatherby at uchc.edu>, python-list at python.org <python-list at python.org>
Subject: Re: Tool that can document private inner class?
*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***

On 2/7/23 14:53, Weatherby,Gerard wrote:
> Yes.
>
> Inspect module
>
> import inspect
>
>
> class Mine:
>
> def __init__(self):
> self.__value = 7
>
> def __getvalue(self):
> /"""Gets seven"""
> /return self.__value
>
>
> mine = Mine()
> data = inspect.getdoc(mine)
> for m in inspect.getmembers(mine):
> if '__getvalue' in m[0]:
>          d = inspect.getdoc(m[1])
> print(d)
>

Can inspect generate HTML documentation, à la Sphinx and other tools?

--
========================================================================
Google                                      Where SkyNet meets Idiocracy
========================================================================


More information about the Python-list mailing list