Re: commenting out blocks of code

Discussion in 'Python' started by Jean-Paul Calderone, Feb 18, 2006.

  1. On Sat, 18 Feb 2006 12:36:06 +1100, Steven D'Aprano <> wrote:
    > [snip]
    >
    >Commenting and uncommenting should be two different commands: the whole
    >point of nested comments is that it allows you to comment a block of text
    >which may already contain comments. Having one command do both commenting
    >and uncommenting according to the presence or absence of semantic clues in
    >the text is a recipe for failure ("No you stupid computer, I want to
    >COMMENT that block, not uncomment it!!!").
    >
    >Imagine if your text editor used cntl-C for both copy and paste, somehow
    >guessing whether you wanted to copy selected text or paste over it
    >according to some subtle clue in the text itself. Wouldn't that be fun?
    >


    emacs' comment-dwim (M-;) has never guessed incorrectly, in my experience. Of course, if it ever does, I can always invoke comment-region or uncomment-region, as appropriate.

    >
    >
    >--
    >Steven.
    >
    >--
    >http://mail.python.org/mailman/listinfo/python-list
    >
     
    Jean-Paul Calderone, Feb 18, 2006
    #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. =?Utf-8?B?U2FuZHk=?=

    Commenting out VB code

    =?Utf-8?B?U2FuZHk=?=, Feb 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    51,980
    =?Utf-8?B?Sm9uWg==?=
    Feb 3, 2005
  2. patrick

    java commenting out of code

    patrick, Jan 11, 2006, in forum: Java
    Replies:
    4
    Views:
    5,268
    Malte Christensen
    Jan 11, 2006
  3. Paul McNett

    Re: commenting out blocks of code

    Paul McNett, Feb 18, 2006, in forum: Python
    Replies:
    1
    Views:
    640
    Cameron Laird
    Feb 18, 2006
  4. Peter Hansen

    Re: commenting out blocks of code

    Peter Hansen, Feb 18, 2006, in forum: Python
    Replies:
    8
    Views:
    1,386
    Neil Hodgson
    Feb 20, 2006
  5. matt
    Replies:
    1
    Views:
    287
    George Ogata
    Aug 6, 2004
Loading...

Share This Page