brennivin.dochelpers module

Some helpers for creating pretty documentation. Usually only of use with brennivin but you can use for your own purposes if you want.

You can use the default or unsupplied objects to act as a unique sentinel, and ignore for “private” parameters (such as those with a leading underscore).

Members

brennivin.dochelpers.named_none(s)

Return an instance where bool(obj) == False and will return s when stringified.

brennivin.dochelpers.pretty_func(func, reprstr)

Returns a callable that has the same behavior as func, and will return reprstr when strigified.

brennivin.dochelpers.pretty_module_func(func)

Same as pretty_func() but for module functions (will automatically pull the repr string from its module and name).

brennivin.dochelpers.pretty_value(value, reprstr)

Returns as a callable that will return value when invoked with no parameters, and will return reprstr when stringified.