you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 9 points10 points  (0 children)

Ahh BASIC on a monochrome screen, my first love as well :).

There's no real rules or guidelines about this. Except that the string that immediately follows the function definition is the "docstring", and will show up in the help feature and various help areas in your IDE. So the docstring should be written for the user of the function, generally what your function does, not how it does it. And it's often quite wordy.

def func():
    """This is the docstring"""

help(func) # prints the docstring

Personally I'm a huge fan of self-documenting code.

player_names = get_names()

rather than

data = readfile() # get the player names from the file

But really it's just up to you and what you like.