Docstrings considered too complicated
John Posner
jjposner at optimum.net
Wed Feb 24 19:17:58 EST 2010
On 2/24/2010 4:54 PM, Jonathan Gardner wrote:
> On Wed, Feb 24, 2010 at 12:23 PM, Andreas Waldenburger
> <usenot 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?
>>
>
> kill -9 seems to work for me.
>
> You may want to explain, one day, why what they are doing is wrong.
>
They are thinking in JavaDoc, not Python.
#------------------------------
"""Function that does stuff"""
def doStuff():
while not wise(up):
yield scorn
def doOtherStuff():
"""Function that does stuff"""
while wise(up):
yield joy
print doStuff.__doc__
print doOtherStuff.__doc__
#------------------------------
program output:
None
Function that does stuff
-John
More information about the Python-list
mailing list