A simple single line, triple-quoted comment is giving syntax error. Why?
Laurent Pointal
laurent.pointal at laposte.net
Wed Mar 18 14:06:39 EDT 2015
Laurent Pointal wrote:
(oups)
> Take care of indent:
>
> def f(x):
> a = 5
> """an correctly indented expression to be
> inside the function"""
> return a * x
Here only the first indent of """ at beginning of the string to be aligned
to function bloc is important, remaining content of the string can be
indented or not.
More information about the Python-list
mailing list