There is a wonderful feature in Python, the document string, also known as DocStrings. You can use it to add descriptive text for our modules, classes, and functions to make the program easy to read and understand. More importantly, you can output descriptive text information using the standard method that comes with Python. The following is an example. ThisisMyownModuleDate: 2011-09-07Author: ChrisMaoThisisdescription... there is a wonderful feature in Python, the document string, also known as DocStrings. You can use it to add descriptive text for our modules, classes, and functions to make the program easy to read and understand. More importantly, you can output descriptive text information using the standard method that comes with Python. The following is an example.
'''This is My own ModuleDate: 2011-09-07Author: Chris MaoThis is description information ''' class TestClass: ''' This is TestClass 'docstrings ''' def func1 (): '''This is func1's DocStrings ''' passdef func2 (): '''This is func2 ''' print "this is func2" print func2. _ doc __