Re:Learn Python in minutes
by ufo on Friday June 28, 2013 @08:00PM
(#5960977)
"""-delimited text is not actually a comment. Its a multiline string literal
And you can also use single quotes if you want.
The reason this might have been confused with a comment is because triple-quoted strings are often used for documentation strings, a Python feature that gives special meaning to string literals that occur as the first statement in a function or class. Those strings get associated to the function as its documentation and can even be inspected at runtime:
[ Parent
| on HN ]
There are no comments on this comment yet.