Add constant example

This commit is contained in:
khr 2020-07-20 22:10:33 -07:00
parent de73e1a27b
commit e9fc2d8e02
2 changed files with 5 additions and 3 deletions

View File

@ -8,8 +8,11 @@ It can include specific function docs here:
.. autofunction:: math.log .. autofunction:: math.log
And here's the docs for our second module: And here's the docs for our second module. We'll include ``undoc-members`` this
time:
.. automodule:: simple .. automodule:: simple
:members: :members:
:undoc-members:
And that's all she wrote.

View File

@ -1,8 +1,7 @@
__all__ = ["SIMPLE_CONST", "bar"] __all__ = ["SIMPLE_CONST", "bar"]
SIMPLE_CONST = 2 SIMPLE_CONST = 2 #: The number 2
def bar(a, b): def bar(a, b):
"""Returns whether :a: and :b: have passed the bar exam in their state."""
return a + b > SIMPLE_CONST return a + b > SIMPLE_CONST