L
Lawrence D'Oliveiro
The Python docs recommend the use of triple-quoted string literals for
docstrings, e.g.
def Meet(Alice, Bob) :
"""arranges a meeting between Alice and Bob.
Returns a reference to the meeting booking object."""
...
#end Meet
However, these tend to get messed up by indentation whitespace, which gets
spuriously included as part of the string.
Another possibility is to use implicit concatenation of string literals,
e.g.
def Meet(Alice, Bob) :
"arranges a meeting between Alice and Bob." \
" Returns a reference to the meeting booking object."
...
#end Meet
This includes no spurious whitespace, or even any newlines; if you want
these, you must put them explicitly in the string:
def Meet(Alice, Bob) :
"arranges a meeting between Alice and Bob.\n" \
"Returns a reference to the meeting booking object."
...
#end Meet
docstrings, e.g.
def Meet(Alice, Bob) :
"""arranges a meeting between Alice and Bob.
Returns a reference to the meeting booking object."""
...
#end Meet
However, these tend to get messed up by indentation whitespace, which gets
spuriously included as part of the string.
Another possibility is to use implicit concatenation of string literals,
e.g.
def Meet(Alice, Bob) :
"arranges a meeting between Alice and Bob." \
" Returns a reference to the meeting booking object."
...
#end Meet
This includes no spurious whitespace, or even any newlines; if you want
these, you must put them explicitly in the string:
def Meet(Alice, Bob) :
"arranges a meeting between Alice and Bob.\n" \
"Returns a reference to the meeting booking object."
...
#end Meet