Revisiting attribute docstrings

I think the definition would only need to be altered within function signatures, right? Because I would think the following two (not within a function) are already identical in meaning? (Not completely sure about this though.)

PI: float = 3.14
"""The mathematical constant pi."""

vs

PI: float = 3.14; """The mathematical constant pi."""

And I think it does look clearer with the semicolons:

def foo(
    bar; """A required parameter.""",
    baz: int = None; """An optional parameter.""",
):
    ...
5 Likes