Re: triple quoted strings as comments

2006-02-06 Thread Jorgen Grahn
On 6 Feb 2006 12:53:53 GMT, Volker Grabsch <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: [...] developer had commented out about 50 lines of C++ code by just putting a /* at the top and a */ at the bottom. > [...] >> ("#if 0" in C and C++ are better choices, but only marginally.

Re: triple quoted strings as comments

2006-02-06 Thread Volker Grabsch
Jorgen Grahn wrote: >>> [...] developer had >>> commented out about 50 lines of C++ code by just putting a /* at the top >>> and a */ at the bottom. [...] > ("#if 0" in C and C++ are better choices, but only marginally. Best is to > remove the code unless you are sure it's needed again soon. Work

Re: triple quoted strings as comments

2006-02-05 Thread Jorgen Grahn
On Wed, 01 Feb 2006 13:41:33 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: > Roy Smith schreef: ... >> /* */ also allows for some truly spectacularly bad coding practices. Not >> long ago, I ran into some real-life code where a previous developer had >> commented out about 50 lines of C++ code

Re: triple quoted strings as comments

2006-02-01 Thread Roel Schroeven
Roy Smith schreef: > Magnus Lycka <[EMAIL PROTECTED]> wrote: >> An editor that adds/removes '# ' in the beginning of each >> marked line is fairly bullet proof. Adding e.g. /* to the >> beginning of a block you want to comment out, & */ to the >> end, breaks if you have /* */ style comments in the

Re: triple quoted strings as comments

2006-02-01 Thread Roy Smith
Magnus Lycka <[EMAIL PROTECTED]> wrote: > An editor that adds/removes '# ' in the beginning of each > marked line is fairly bullet proof. Adding e.g. /* to the > beginning of a block you want to comment out, & */ to the > end, breaks if you have /* */ style comments in the block! /* */ also allows

Re: triple quoted strings as comments

2006-02-01 Thread Magnus Lycka
dmh2000 wrote: > I recently complained elsewhere that Python doesn't have multiline > comments. It seems you have a bad editor if it can't conveniently add and remove comment markers for arbitrary blocks in your source. (Maybe you just didn't find this feature.) That every comment line begins wit

Re: triple quoted strings as comments

2006-01-31 Thread Jeffrey Schwab
Steve Holden wrote: > dmh2000 wrote: > >> I recently complained elsewhere that Python doesn't have multiline >> comments. > > > Personally I think it's a win that you couldn't find anything more > serious to complain about :-) +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: triple quoted strings as comments

2006-01-31 Thread Duncan Booth
dmh2000 wrote: > example > > def fun(self): > """doc comment > comment line 2 > """ > > x = 1 > y = 2 > > """does this triple quoted string used as a comment > cause something to happen at runtime beyond > just skipping over it? Such as allocation of memory for a st

Re: triple quoted strings as comments

2006-01-30 Thread Steve Holden
dmh2000 wrote: > I recently complained elsewhere that Python doesn't have multiline > comments. Personally I think it's a win that you couldn't find anything more serious to complain about :-) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: triple quoted strings as comments

2006-01-30 Thread Roy Smith
"dmh2000" <[EMAIL PROTECTED]> wrote: > I recently complained elsewhere that Python doesn't have multiline > comments. Of course it has multi-line comments. They look like this: # This is the first line # and this is the second. Why is that a problem? -- http://mail.python.org/mailman/listinfo/

Re: triple quoted strings as comments

2006-01-30 Thread André
dmh2000 wrote: > I recently complained elsewhere that Python doesn't have multiline > comments. i was told to use triple quoted strings to make multiline > comments. My question is that since a triple quoted string is actually > a language construct, does it use cause a runtime construction of a >

Re: triple quoted strings as comments

2006-01-30 Thread Terry Hancock
On 30 Jan 2006 16:29:15 -0800 "dmh2000" <[EMAIL PROTECTED]> wrote: > I recently complained elsewhere that Python doesn't have > multiline comments. i was told to use triple quoted > strings to make multiline comments. My question is that > since a triple quoted string is actually a language > const

Re: triple quoted strings as comments

2006-01-30 Thread Peter Hansen
dmh2000 wrote: > I recently complained elsewhere that Python doesn't have multiline > comments. i was told to use triple quoted strings to make multiline > comments. My question is that since a triple quoted string is actually > a language construct, does it use cause a runtime construction of a >

Re: triple quoted strings as comments

2006-01-30 Thread [EMAIL PROTECTED]
as i know, the triple quoted string does cause a runtime construction, and will not be discarded, and it's a benefit of python language. here is sth. useful. _http://diveintopython.org/power_of_introspection/index.html best regard -- http://mail.python.org/mailman/listinfo/python-list

triple quoted strings as comments

2006-01-30 Thread dmh2000
I recently complained elsewhere that Python doesn't have multiline comments. i was told to use triple quoted strings to make multiline comments. My question is that since a triple quoted string is actually a language construct, does it use cause a runtime construction of a string which is then disc