Kar1o / endgame-singularity

Automatically exported from code.google.com/p/endgame-singularity
0 stars 0 forks source link

Add docstrings #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Docstrings would be handy in the documentation of the code. Currently these
are missing though.

Original issue reported on code.google.com by tinu...@skynet.be on 1 May 2008 at 6:12

GoogleCodeExporter commented 9 years ago
Specifically, we've got a lot of cases where a function looks like this:

# Here's a comment describing what the function does, 
# how to use it, and so on.
def my_function(...)
  do_stuff()

These should be converted to this:

def my_function(...)
    """The comment description has been moved into a 
       docstring.  This is more useful, because Python 
       understands these and uses them to answer calls
       to help().

       Additionally, Python code management tools will
       often use these much like Java's JavaDoc system,
       to build external documentation."""

    do_stuff()

Original comment by funnyman3595 on 1 May 2008 at 6:20

GoogleCodeExporter commented 9 years ago
The attachment is a bash script that converts the code to the docstring format.

It doesn't overwrite the code, but places the converted code in the directory
'conv/'. Don't forget to edit the BASE_DIR variable.

Known issue: __init__ is not allowed to have a docstring, but this script 
ignores that.

Original comment by tinu...@skynet.be on 1 May 2008 at 11:00

Attachments:

GoogleCodeExporter commented 9 years ago
The attachment is a newer version of the sed script, which handles __init__ 
correctly.

Original comment by tinu...@skynet.be on 2 May 2008 at 9:03

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by funnyman3595 on 16 May 2008 at 1:22

GoogleCodeExporter commented 9 years ago
Shifting to next release milestone.

Original comment by phil.bor...@gmail.com on 27 Jan 2009 at 12:36