Use autodoc to document methods which aren't included in examples.
There are some interesting methods in Lock
class, which don't seem to be documented. This is merely to expose the existing docstrings in documentation so that everyone doesn't have to go spelunking in source code :)
Also, moved the docstring from __init__
to Class itself, since that is what autodoc uses. Let me know if you don't like it and I can move it back to the original place.
There isn't any directive in PEP 257 about where to put class level docstring, but sphinx clearly wants it on the top level (unless you forcibly ask it to document a special __init__
method).