[Tutor] multiline comment in Python

tpc at csua.berkeley.edu tpc at csua.berkeley.edu
Fri Sep 5 13:05:11 EDT 2003


hi Karl,
One example is when I use triple quotes to comment out a block of code
that already has print statements I had inserted in there earlier for
debugging purposes, Python will then give me a syntax error.  This gets
into the nesting of comments Danny was talking about.

On Thu, 4 Sep 2003, Karl [iso-8859-1] Pfl=E4sterer wrote:

> An unnamed person wrote:
>
> > hello all, I am wondering if there is anything other than triple quotes
> > for multiline commenting blocks of code.  I am rather disappointed with
> > triple quote commenting because Python sometimes gives me a syntax erro=
r
> > which means I have to prepend a # in front of each line which can get
>
> Can you give a n example where something like that happens?  It's either
> a bug in Python (very unlikely) or an error in your code.
>
> > tedious.  I am running Python 2.2.3 and was really hoping for the /** *=
/
> > multiline commenting in C and Java.  Thanks in advance.
>
> Where's the difference if you type /* ... */ or """ ... """?
>
>
>    Karl
> --
> Please do *not* send copies of replies to me.
> I read the list
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>




More information about the Tutor mailing list