Created
December 20, 2012 23:29
-
-
Save anonymous/4349536 to your computer and use it in GitHub Desktop.
A simple python program using epydoc syntax to document the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def myfunc(message): | |
""" | |
This is external function | |
@param message: this is string that is going to be printed | |
@return: none | |
""" | |
print("myfunc: %s" % message) | |
class MyClass: | |
""" | |
My class that implement 2 demo functions. | |
""" | |
def __init__(self, s): | |
self.s=s | |
def f1(self, message=None): | |
""" | |
The function prints a string on stdout | |
@param message: a string | |
""" | |
print("main:f1: %s" % message) | |
def f2(self, message=None): | |
""" | |
The function prints a string on stdout | |
@param message: a string | |
@return: a value zero | |
""" | |
print("main:f2: %s" % message) | |
return 0 | |
def main(self): | |
self.f1(self.s) | |
self.f2(self.s) | |
myfunc(self.s) | |
if __name__ == '__main__': | |
MyClass('epydoc demo').main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment