Clean Singleton Docstrings

Michael Selik michael.selik at gmail.com
Thu Jul 7 23:43:17 EDT 2016



> On Jul 7, 2016, at 7:46 PM, Rob Gaddi <rgaddi at highlandtechnology.invalid> wrote:
> 
> I've got a package that contains a global ensmartened dict that allows
> all the various parts of my program to share state.

The simplest solution would be to use a module as your singleton. For example, "registry.py" would work. Pydoc will show its docstring, and it will have all the features you had been using, with the added benefit of not needing to enforce its singletonness.
     


More information about the Python-list mailing list