Re: why no block comments in Python?

2006-03-11 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Jonathan Gardner" <[EMAIL PROTECTED]> wrote: > Warby wrote: > > ...and I forgot to mention that the output of grep and diff is far more > > understandable in the absence of block comments! > > Which is why people do this /anyway/. (Kind of makes block comments >

Re: why no block comments in Python?

2006-03-11 Thread Jonathan Gardner
Warby wrote: > ...and I forgot to mention that the output of grep and diff is far more > understandable in the absence of block comments! Which is why people do this /anyway/. (Kind of makes block comments pointless, doesn't it? /* This is a * really * really * long * block comment */ -- h

Re: why no block comments in Python?

2006-03-10 Thread Terry Hancock
On Sat, 11 Mar 2006 10:23:56 +1100 "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > On Thu, 09 Mar 2006 18:02:27 -0600, Terry Hancock wrote: > > > On 9 Mar 2006 07:21:00 -0800 > > "msoulier" <[EMAIL PROTECTED]> wrote: > >> > (and if you don't, you can quickly comment out > >regions > > by putting t

Re: why no block comments in Python?

2006-03-10 Thread Steven D'Aprano
On Thu, 09 Mar 2006 18:02:27 -0600, Terry Hancock wrote: > On 9 Mar 2006 07:21:00 -0800 > "msoulier" <[EMAIL PROTECTED]> wrote: >> > (and if you don't, you can quickly comment out regions >> > by putting them inside a triple-quoted string.) >> >> Although that will use up memory, as opposed to a

Re: why no block comments in Python?

2006-03-09 Thread Terry Hancock
On 9 Mar 2006 07:21:00 -0800 "msoulier" <[EMAIL PROTECTED]> wrote: > > (and if you don't, you can quickly comment out regions > > by putting them inside a triple-quoted string.) > > Although that will use up memory, as opposed to a comment. Not really. Unless it is the first string in the block (

Re: why no block comments in Python?

2006-03-09 Thread Peter Otten
msoulier wrote: >> (and if you don't, you can quickly comment out regions by putting them >> inside a triple-quoted string.) > > Although that will use up memory, as opposed to a comment. Doesn't seem so: >>> def f(): ... "docstring" ... "another string" ... a = 42 ... "yet ano

Re: why no block comments in Python?

2006-03-09 Thread Roy Smith
msoulier <[EMAIL PROTECTED]> wrote: >> (and if you don't, you can quickly comment out regions by putting them >> inside a triple-quoted string.) > >Although that will use up memory, as opposed to a comment. I can't imagine a realistic scenario where the amount of memory wasted by triple-quoting ou

Re: why no block comments in Python?

2006-03-09 Thread msoulier
> (and if you don't, you can quickly comment out regions by putting them > inside a triple-quoted string.) Although that will use up memory, as opposed to a comment. Still, it's simple enough in an editor like Vim or Emacs to highlight a region, and define a macro to add/remove #s. Any Python IDE

Re: why no block comments in Python?

2006-03-09 Thread Benji York
Terry Hancock wrote: > I'm thinking this might be a use-case for the new support for > doctests in a separate file. Having doctests in their own file is (IMHO) a majorly under appreciated feature of doctest. The ability to do either nice user (as in developer) docs with known good examples or w

Re: why no block comments in Python?

2006-03-08 Thread Paddy
I have found that some editors colourize text based on parsing a section of text around what is visible. Long, multi-line comments or strings might not then get colored correctly. Personally, I do use block comments in other languages but maybe they should not exist in finished code for reasons al

Re: why no block comments in Python?

2006-03-08 Thread Terry Hancock
On Wednesday 08 March 2006 12:42 pm, Warby wrote: > The danger with block comments is that there is no way to tell that the > code you're looking at has been commented out unless you can see the > start or end of the comment block. If you have a modern editor, it > probably changes the color of al

Re: why no block comments in Python?

2006-03-08 Thread Roy Smith
Warby <[EMAIL PROTECTED]> wrote: >Eliminating block comments eliminates uncertainty. :) An even better way to eliminate uncertainty is to eliminate the code. Commenting out is fine for a quick test during development. Once the code is committed, the dead code should be eliminated completely. --

Re: why no block comments in Python?

2006-03-08 Thread John Salerno
Warby wrote: > The danger with block comments is that there is no way to tell that the > code you're looking at has been commented out unless you can see the > start or end of the comment block. If you have a modern editor, it > probably changes the color of all commented out code to eliminate >

Re: why no block comments in Python?

2006-03-08 Thread Warby
...and I forgot to mention that the output of grep and diff is far more understandable in the absence of block comments! -- http://mail.python.org/mailman/listinfo/python-list

Re: why no block comments in Python?

2006-03-08 Thread Warby
It's clear that if you have a modern editor, block comments are unnecessary because it is trivial to add a # to the start of each line of a block, but that doesn't really answer your question. It explains why you might not always need block comments but doesn't explain why you shouldn't use them (

Re: why no block comments in Python?

2006-03-08 Thread Fredrik Lundh
Roy Smith wrote: > > you can quickly comment out regions by putting them > > inside a triple-quoted string.) > > Except that triple-quotes don't nest. ''' """...except when they do""" ''' -- http://mail.python.org/mailman/listinfo/python-list

Re: why no block comments in Python?

2006-03-08 Thread Roy Smith
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > you can quickly comment out regions by putting them > inside a triple-quoted string.) Except that triple-quotes don't nest. I do agree, however, with the idea that any decent editor should be able to comment out a block of code faster than I can type thi

Re: why no block comments in Python?

2006-03-08 Thread Fredrik Lundh
John Salerno wrote: > I'm still tyring to figure out what "Pythonic" means, and I have a > feeling the answer to my question may fall into that category. Are block > comments somehow unpythonic? only in the sense that python don't have them. but they're pretty pointless, if you have a modern edi

why no block comments in Python?

2006-03-08 Thread John Salerno
I'm still tyring to figure out what "Pythonic" means, and I have a feeling the answer to my question may fall into that category. Are block comments somehow unpythonic? -- http://mail.python.org/mailman/listinfo/python-list