docstrings style question

Steve Brown steve at mhomer.au
Fri Jan 11 03:09:26 CET 2008


What I'm trying to do with the tests is pare them back so that
the code explicitly and concisely documents the tests.

It is important that the comments and doc strings NOT contain
information about how Temperature Sense works because that
is outside the scope of the test.

More generally, comments like this

    i++            #increments i

indicate that the author thinks that the most complex thing
present is the syntax, a comment like this:

    i++            #next voltage

indicates that the author thinks the most complex thing present
is the variable mapping.

For the readers and maintainers of these tests, the most complex
thing present is the syntax, not the test logic, so if I need to add
more documentation, it will look like this:

# Temperature Sense Test
# Lines starting with # are comments
# Variables are case sensitive
# Tab characters will break this file

-- and go from there.

Steve


"Martin Marcher" <martin at marcher.name> wrote in message 
news:mailman.397.1199959984.896.python-list at python.org...
> Russ P. wrote:
>





More information about the Python-list mailing list