On 21/11/2014 07:52, Marko Rauhamaa wrote:
sohcahto...@gmail.com:

>My point was that I was making fun of CS professors that demand a
>comment on every line of code, regardless of how clear the line of
>code is.
Unfortunately, a lot of software houses do a similar thing. Not quite
every line, but stuff like:

    def write_line_to_file(file, line):
        """Write a line to a file.

           file is the file to add a line to
           line is the line to add to the file"""
        ...

To acknowledge the OP, the statistics module deserves to be taken as example for writing good comments and docstrings:

https://hg.python.org/cpython/file/3.4/Lib/statistics.py

--
Marco Buttu

INAF-Osservatorio Astronomico di Cagliari
Via della Scienza n. 5, 09047 Selargius (CA)
Phone: 070 711 80 217
Email: mbu...@oa-cagliari.inaf.it

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to