Re: comment out more than 1 line at once?

2004-11-30 Thread Jim Dovis
Don't forget ''' This is a comment ''' Which you'll need to use if you use """ for docstrings. Byron wrote: > """ > Yes, this is generally how it is done in python. > """ -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Byron
Marc Boeren wrote: Well, you could fake it by doing """ block of code here is commented out """ """ Yes, this is generally how it is done in python. """ Byron --- -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Skip Montanaro
>> if False: >> >> (indented) block of code here is commented out >> I've no idea how efficient it is compared to triple-quoted strings or >> line by line comments. Gustavo> Actually, it's infinitly [sp?] more defficient (contrary of Gustavo> efficient?) than triple-

Re: comment out more than 1 line at once?

2004-11-30 Thread Rob Williscroft
Gustavo Córdova Avila wrote in news:mailman.6944.1101838678.5135.python- [EMAIL PROTECTED] in comp.lang.python: > Actually, it's infinitly [sp?] more defficient > (contrary of efficient?) than triple-quoted strings > or line-by-line comments, because those two never > make it to execution stage, b

Re: comment out more than 1 line at once?

2004-11-30 Thread Gustavo Córdova Avila
Rob Williscroft wrote: Riko Wichmann wrote in news:[EMAIL PROTECTED] in comp.lang.python: Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ if False: (indented) block of

Re: comment out more than 1 line at once?

2004-11-30 Thread Rob Williscroft
Riko Wichmann wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Dear all, > > is there a way in Python to comment out blocks of code without putting a > # in front of each line? Somethings like C's > > /* > block of code here is commented out > */ > if False: (indented) block of

Re: comment out more than 1 line at once?

2004-11-30 Thread Skip Montanaro
Riko> I'm using emacs (with python-mode) to do most of my editing. C-c # is bound to py-comment-region in python-mode. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Peter Hansen
Gustavo Córdova Avila wrote: Riko Wichmann wrote: is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's I haven't seen the "other" way to block-comment multiple lines of code: triple-quoted strings. Building on this thought: it's ver

Re: comment out more than 1 line at once?

2004-11-30 Thread Gustavo Córdova Avila
Riko Wichmann wrote: Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ Thanks, Riko I haven't seen the "other" way to block-comment multiple lines of code: triple-quoted

Re: comment out more than 1 line at once?

2004-11-30 Thread Jerry Sievers
Uwe Grauer <[EMAIL PROTECTED]> writes: > Riko, > > if you are using emacs, try C-c # to comment out a block of code. > Unfortunally Uncomment is not bound to a key by default. > Do a key-binding for it by yourself. In Emacs, you can have the comment-region command do uncomment by typing C-u firs

Re: comment out more than 1 line at once?

2004-11-30 Thread Roy Smith
Riko Wichmann <[EMAIL PROTECTED]> wrote: > I'm using emacs (with python-mode) to do most of my editing. also tried > IDLE from python already, which is nice but an old dog doesn't like to > learn new tricks :) Emacs is great for stuff like this. There's probably other ways to do it, but what I

Re: comment out more than 1 line at once?

2004-11-30 Thread Dave Cook
On 2004-11-30, Uwe Grauer <[EMAIL PROTECTED]> wrote: > if you are using emacs, try C-c # to comment out a block of code. > Unfortunally Uncomment is not bound to a key by default. Uncomment is C-u C-c #, at least in xemacs. Rectangle delete sometimes works in a pinch (C-x r k, once you've marked

Re: comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
Ha! have just discover C-c # myself (sometimes it helps to actually look at the emacs menus, even if you are used to using the key-bindings :) Better yet works "Meta-;" as Bernhard suggested, because it comments and un-comments marked line! Thanks for all the helpful tips! - Riko Riko,

Re: comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
I'm using emacs (with python-mode) to do most of my editing. also tried IDLE from python already, which is nice but an old dog doesn't like to learn new tricks :) Maybe I just don't know to comment out whole blocks using editor commands. Probably the trick Marc mentions in the following post wi

Re: comment out more than 1 line at once?

2004-11-30 Thread Uwe Grauer
Riko Wichmann wrote: I'm using emacs (with python-mode) to do most of my editing. also tried IDLE from python already, which is nice but an old dog doesn't like to learn new tricks :) Maybe I just don't know to comment out whole blocks using editor commands. Probably the trick Marc mentions in

Re: comment out more than 1 line at once?

2004-11-30 Thread Bernhard Herzog
Riko Wichmann <[EMAIL PROTECTED]> writes: > I'm using emacs (with python-mode) to do most of my editing. [...] > Maybe I just don't know to comment out whole blocks using editor > commands. comment-dwim (usually bound to M-; ) comments out the region if it's active, or, if the region is already c

RE: comment out more than 1 line at once?

2004-11-30 Thread Marc Boeren
> Riko Wichmann wrote: > > > Dear all, > > > > is there a way in Python to comment out blocks of code > without putting > > a # in front of each line? Somethings like C's > > > > /* > > block of code here is commented out > > */ Well, you could fake it by doing """ block of code h

Re: comment out more than 1 line at once?

2004-11-30 Thread Aaron Bingham
Riko Wichmann wrote: Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ No. Why do you want this? Any good programmer's editor will have a comment/uncomment feature to mak

comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ Thanks, Riko -- http://mail.python.org/mailman/listinfo/python-list