Created
July 13, 2010 12:36
-
-
Save tkf/473795 to your computer and use it in GitHub Desktop.
This file contains 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
"""Module docstring""" | |
def myfunc(): | |
"""Function docstring""" | |
print __doc__ | |
print myfunc.__doc__ | |
class MyClass(object): | |
"""Class docstring""" | |
def __init__(self, ): | |
"""Method docstring""" | |
print __doc__ | |
print self.__doc__ | |
print self.__init__.__doc__ | |
if __name__ == '__main__': | |
myfunc() ## Module, Function docstring | |
MyClass() ## Module, Class, Method docstring |
This file contains 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
Module docstring | |
Function docstring | |
Module docstring | |
Class docstring | |
Method docstring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment