Clean Singleton Docstrings
Steven D'Aprano
steve at pearwood.info
Thu Jul 7 22:53:41 EDT 2016
On Fri, 8 Jul 2016 09:46 am, Rob Gaddi wrote:
[...]
> So Registry is now a globally accessible mutable object; no reason to
> complicate things with singletons or borgs or whathave you. From
> within the interactive console, help(foobar.Registry) gives me the
> _Registry documentation as expected.
>
> From the (Linux) command line though:
> $ pydoc3 foobar._Registry
> [lots of good documentation stuff]
> $ pydoc3 foobar.Registry
> no Python documentation found for 'foobar.Registry'
>
> Is this a thing that can be fixed with a commensurate amount of effort?
[steve at ando ~]$ python3 -m pydoc --help
pydoc - the Python documentation tool
pydoc <name> ...
Show text documentation on something. <name> may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to A CLASS OR FUNCTION within a module [...]
(Emphasis added.)
So, no, reading the docstrings from individual objects is not supported by
pydoc's command line interface. You could possibly add that functionality,
but I don't know how much effort it would be.
--
Steven
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list