Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Comments/Python/comments-1.py
Normal file
2
Task/Comments/Python/comments-1.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# This is a comment
|
||||
foo = 5 # You can also append comments to statements
|
||||
9
Task/Comments/Python/comments-2.py
Normal file
9
Task/Comments/Python/comments-2.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"""Un-assigned strings in triple-quotes might be used
|
||||
as multi-line comments
|
||||
"""
|
||||
|
||||
'''
|
||||
"triple quoted strings" can be delimited by either 'single' or "double" quote marks; and they can contain mixtures
|
||||
of other quote marks without any need to \escape\ them using any special characters. They also may span multiple
|
||||
lines without special escape characters.
|
||||
'''
|
||||
17
Task/Comments/Python/comments-3.py
Normal file
17
Task/Comments/Python/comments-3.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python
|
||||
# Example of using doc strings
|
||||
"""My Doc-string example"""
|
||||
|
||||
class Foo:
|
||||
'''Some documentation for the Foo class'''
|
||||
def __init__(self):
|
||||
"Foo's initialization method's documentation"
|
||||
|
||||
def bar():
|
||||
"""documentation for the bar function"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
print (__doc__)
|
||||
print (Foo.__doc__)
|
||||
print (Foo.__init__.__doc__)
|
||||
print (bar.__doc__)
|
||||
Loading…
Add table
Add a link
Reference in a new issue