RE: Multi-Line Comment

Discussion in 'Python' started by Tim Peters, Aug 11, 2003.

  1. Tim Peters

    Tim Peters Guest

    [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.
     
    Tim Peters, Aug 11, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alec S.
    Replies:
    10
    Views:
    10,269
    Alec S.
    Apr 16, 2005
  2. Doug Tolton

    Multi-Line Comment

    Doug Tolton, Aug 11, 2003, in forum: Python
    Replies:
    14
    Views:
    1,147
    Tom Plunket
    Aug 13, 2003
  3. dean
    Replies:
    5
    Views:
    490
    Phlip
    Jun 4, 2006
  4. bernadou

    Force multi line field value to output with line breaks?

    bernadou, Jan 22, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    385
    bernadou
    Jan 23, 2006
  5. Anthony Papillion
    Replies:
    0
    Views:
    137
    Anthony Papillion
    Sep 2, 2013
Loading...

Share This Page