Clean Singleton Docstrings

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Wed Jul 13 18:42:18 EDT 2016


On Friday, July 8, 2016 at 7:38:56 PM UTC+12, Peter Otten wrote:

> There is a test
> 
> if not object:
>     raise ImportError('no Python documentation found for %r' % thing)
> 
> in the pydoc module. So all you need is to ensure that your Registry 
> evaluates to True in a boolean context, e. g. by putting something into it: 

And there are still those who think that Python’s lax acceptance of non-boolean values as booleans is a good idea...



More information about the Python-list mailing list