Oops, you're right.
What I should have said is to use a blank docstring as
follows:
Function docstring.
def foo:
...
or:
Module docstring.
def foo:
...
--- Anthony Baxter [EMAIL PROTECTED] wrote:
On Monday 21 March 2005 20:08, Nicholas Jacobson
wrote:
How do you distinguish
Rule #1: If the docstring is the first line of a
module, it's the module's docstring.
Rule #2: If the docstring comes right before a
class/function, it's that class/function's docstring.
How do you distinguish between a docstring at the
top of a module
that's immediately followed by a
IIRC, Guido once mentioned that he regretted not
setting function docstrings to come before the
function declaration line, instead of after.
i.e.
This describes class Bar.
class Bar:
...
Or with a decorator:
This describes class Bar.
@classmethod
class Bar:
...
Versus the current method: