A simple single line, triple-quoted comment is giving syntax error. Why?
Aditya Raj Bhatt
adityarajbhatt at gmail.com
Wed Mar 18 14:23:59 EDT 2015
On Wednesday, March 18, 2015 at 1:04:39 PM UTC-5, Laurent Pointal wrote:
> > Can someone also provide a sort of a 'guide' to triple-quoted
comments
> > in general?
>
> A triple ' or " string is a Python string, allowing line-return in
string.
What do you mean by line-return in string? Is it newline? Does it mean I
can write -
'''first part
second part'''
?
> If it is in an expression (like a = 5 '''a comment'''), then it must
be a
> valid expression (and here it is not).
What is not a valid expression here?
><snip>
> A+
> Laurent.
Thank you for the fast and detailed response,
Aditya
More information about the Python-list
mailing list