Andreas Waldenburger wrote:
On Thu, 25 Feb 2010 12:51:00 -0800 (PST) John Roth
<johnro...@gmail.com> wrote:

On Feb 24, 1:23 pm, Andreas Waldenburger <use...@geekmail.invalid>
wrote:
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
[snip]
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?

It's the first. I am superficial like that. I just needed a docstring
to illustrate and didn't want to get overly creative.

Not that they don't write redundant docstrings.

And they use mixedCase function/method names.
and ? whatIsTheProblem ?
PEP8 is one style guide, not *the* style guide. There is neither technical nor readability issue with mixedCase, classes in PEP 8 using MixedCase. The thing is they had to chose one preference for the methods and they choose lower_case. Fine, but it's still a matter of preference (or arbitrary decision). Since you don't write code for the standard library, you can use any other naming convention. You've may have guessed it, I am using mixedCase method names, and I tell you, you cannot compare this in any way with their dumb usage of doctrings you've shown above.

That being said, yoru OP's still soemhow funny, I would have shot them on sight :-)

JM

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

Reply via email to