Skip to content

Instantly share code, notes, and snippets.

@rtomaszewski
Forked from anonymous/example_epydoc.py
Created December 20, 2012 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtomaszewski/4349613 to your computer and use it in GitHub Desktop.
Save rtomaszewski/4349613 to your computer and use it in GitHub Desktop.
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