First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
17
Task/Comments/Python/comments-2.py
Normal file
17
Task/Comments/Python/comments-2.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__)
|
||||
9
Task/Comments/Python/comments.py
Normal file
9
Task/Comments/Python/comments.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.
|
||||
'''
|
||||
Loading…
Add table
Add a link
Reference in a new issue