Docstrings considered too complicated

John Roth johnroth1 at gmail.com
Thu Feb 25 15:51:00 EST 2010


On Feb 24, 1:23 pm, Andreas Waldenburger <use... at geekmail.INVALID>
wrote:
> Hi all,
>
> a company that works with my company writes a lot of of their code in
> Python (lucky jerks). I've seen their code and it basically looks like
> this:
>
> """Function that does stuff"""
> def doStuff():
>     while not wise(up):
>         yield scorn
>
> Now my question is this: How do I kill these people without the
> authorities thinking they didn't deserve it?
>
> /W
>
> --
> INVALID? DE!

Is the problem that they've got the docstring in the wrong place,
or that the comment isn't saying anything that can't be read in
the method name?

The first is easily fixable with a bit of tutorial about how
a properly placed docstring prints out in various contexts, plus
a quick script to move the suckers.

The second is going to take more work to get the point across
that comments that reproduce what the method name says are waste.

John Roth



More information about the Python-list mailing list