A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/022471.html below:

[Python-Dev] PEP 287: reStructuredText Standard DocstringFormat

[Python-Dev] PEP 287: reStructuredText Standard DocstringFormatDavid Abrahams David Abrahams" <david.abrahams@rcn.com
Sat, 6 Apr 2002 12:05:26 -0500
----- Original Message -----
From: "David Goodger" <goodger@users.sourceforge.net>


> David Abrahams wrote:
> > Is it just me, or are docstrings less-convenient than comments?
>
> How do you mean?

I don't know, it's hard to put into words, but I'll try:

1. 5 more characters just to get started. Probably a shift key too, if
I'm going to be stylistically conformant with other work I've seen.
("""...""").

2. The docstring separates the function signature from its body, which
tends to obscure the code a bit. I prefer prefix documentation.

3. Weird indentation when the docstring spans multiple lines

    def foo(bar, baz):
        """Start of doc
rest of doc
and some more doc"""
        function_body()


Documentation is really hard to start with, and every additional barrier
to entry is unacceptable to me. Every time I write a doc string, I think
of all 3 of the above things, which causes a little "cognitive
dissonance", and makes it less likely that I'll write another.

-Dave





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4