Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: Multi-Line Comment

Thread Tools

RE: Multi-Line Comment

Tim Peters
Posts: n/a
[Skip Montanaro]
> Nope, no multi-line comment. The python-mode package which is
> available for Emacs and XEmacs supports commenting a block of text.
> You can also use triple-quoted strings:
> """
> This is a multi-
> line
> comment
> (sort of)
> """
> It gets evaluated but immediately popped from the execution stack.

One of the previous times this came up, Guido suggested that the compiler
could be changed to optimize away string expressions that aren't docstrings.
It was then my task to fire up the time machine so that I could report that
the compiler already did. It still does <wink>. That is, it doesn't get
evaluated or popped -- it's not in the compiled code at all, so is exactly
like a comment in that respect.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox extensions comment History Fan Firefox 4 11-17-2005 02:10 AM
Comment about Firefox Bad Dog Firefox 1 10-02-2005 02:49 AM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
comment faire une d彋ection de niveau haut ou "1" en vhdl ? Arnaud VHDL 2 02-11-2004 06:34 PM
To comment if it's a good style 三人行必有我師 VHDL 6 11-12-2003 08:16 PM