1. Computing

Documenting Python Code the Easy Way

From Al Lukaszewski, About.com GuideMay 15, 2007

A large pile of books. Somewhere in this pile of books, a great idea got lost.
If you have ever had to write the documentation for your own programs, you know the bane that technical writing can be. Comments, even Python comments, only work when you read the source code. If you import a module, you do not always get to see the source.

Fortunately, Python can be the self-documenting programming language. Using docstrings your functions can be used intelligibly and quickly by other programmers. Do them a good turn now and, in six months or a year, both you and they will be able to understand your code. Consider documenting the easy way, and your code karma will stay positive.
Comments
Comments are closed for this post.
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
Top Related Searches python code

©2013 About.com. All rights reserved.