Tool that can document private inner class?
Ian Pilcher
arequipeno at gmail.com
Tue Feb 7 16:01:23 EST 2023
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