Created
April 14, 2018 18:53
-
-
Save arukavina/54c7aa7613253de7e2207c02e8216d6e to your computer and use it in GitHub Desktop.
Python Inner Comments
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
g = 'module attribute (module-global variable)' | |
"""This is g's docstring.""" | |
class AClass: | |
c = 'class attribute' | |
"""This is AClass.c's docstring.""" | |
def __init__(self): | |
"""Method __init__'s docstring.""" | |
self.i = 'instance attribute' | |
"""This is self.i's docstring.""" | |
def f(x): | |
"""Function f's docstring.""" | |
return x**2 | |
f.a = 1 | |
"""Function attribute f.a's docstring.""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment