Excerpts from Colin J. Williams's message of Sun Jul 10 18:28:15 -0400 2011: > Try: > > def f(): > ds= """docstring""" > print ds
That doesn't actually make a docstring, though. It makes a string object and
points the name ds at it. Do you know what a docstring is?
def foo():
"""I am a docstring"""
pass
def bar():
ds = "I am not a docstring!"
def baz():
"I am a docstring too!"
pass
def qux():
'And even me! Quote type don't matter (besides style)'
pass
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
signature.asc
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
