Sion Arrowsmith wrote:
> It appears to me that our fundamental difference is that you see value
> in long-term preservation of sections of commented-out code without
> any kind of real comment as to what's going on, whereas I consider
> this to be appallingly bad practice.
Then you're reading too
Edward Elliott <[EMAIL PROTECTED]> wrote:
>Sion Arrowsmith wrote:
>> Really? Under what circumstances is it easier to see what's going on
>> with start/end comments than with comment-to-end-of-line?
>Off the top of my head:
> [ ... ]
It appears to me that our fundamental difference is that you se
"OKB (not okblacke)" <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > If your revision control system is so inconvenient to use that
> > you'd rather have large blocks of commented-out code, it's time to
> > start using a better RCS -- perhaps a distributed one, so you can
> > commit to your ow
Ben Finney wrote:
> Indeed. Using revision control means never needing to comment out
> blocks of code.
>
> If your revision control system is so inconvenient to use that you'd
> rather have large blocks of commented-out code, it's time to start
> using a better RCS -- perhaps a distributed one,
rx wrote:
> Still a little strange to newcomers that there are three ways to do the
> same and that you should be carefull to use the right '''/""" inside the
> comment else the comment will not work for some reason.
>
> #comment
>
> '''
> comment
> '''
>
> """
> comment
> """
Please, note tha
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> rx wrote:
>
>> I don't understand the problem - why should comments (and I hope you
>> believe there should be a one line comment at least) be restricted to one
>> line. It doesn't work that way for if, while, for.
>
> It
>
> Of course! You should have used """ since you already used ''' in your
> triple-quoted text. But I'm just repeating what I already said (and kept
> above so that you can see it again).
>
> --
> Jorge Godoy <[EMAIL PROTECTED]>
>
Sorry - I should have read more carefully.
I like the ide
rx wrote:
> I don't understand the problem - why should comments (and I hope you
> believe there should be a one line comment at least) be restricted to one
> line. It doesn't work that way for if, while, for.
It is the minimum case that can solve a problem commenting one line -- or
part of it as
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> rx wrote:
>
>> I have commented out a lot of C++ code and miss the block feature in
>> python more than I missed the nested comments in C++.
>> Besides nothing really strange happened.
>> Sometimes you just need to diss
rx wrote:
>
> "Jorge Godoy" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Edward Elliott wrote:
>>
>
>>
>> You can use either """ or '''. I don't keep changing them in my code, so
>> I
>> can always use the other type (usually I use " so for commenting things
>> out
>> I'd us
rx wrote:
> I have commented out a lot of C++ code and miss the block feature in
> python more than I missed the nested comments in C++.
> Besides nothing really strange happened.
> Sometimes you just need to dissable some of the code temporarly as quickly
> as possible, and I like that it is not
Jorge Godoy wrote:
> You can use either """ or '''. I don't keep changing them in my code, so I
> can always use the other type (usually I use " so for commenting things out
> I'd use ') to do that.
It's close, only problem is it doesn't nest. It'll have to be good enough
for now.
>>Forcing p
Peter Tillotson wrote:
> discouraged except where vital. Perhaps we should make them really hard
> and elegant - mandate latex/mathml markup so good editors can display
> the equations we are implementing :-)
I like this guy already! :)
--
http://mail.python.org/mailman/listinfo/python-list
>
> Also, if you remove the start of the block first, then your editor might
> not
> be highlighting anymore... With nested comments things get even worse
> because you might miss the end of the outer block or something like that.
>
> --
> Jorge Godoy <[EMAIL PROTECTED]>
>
I have commente
Jorge Godoy wrote:
> Edward Elliott wrote:
> Try using Subversion. You can work and make diffs disconnected from the
> network.
rcs isn't the issue. I'm already assuming a local store, a networked one
just makes my argument even easier.
>>I'm not saying nested comments solve every problem, jus
Sion Arrowsmith wrote:
> Jorge Godoy <[EMAIL PROTECTED]> wrote:
>>Is it harder to remove "n" lines of code commented out with "#" than "n"
>>lines of multiline commented code? How?
>
> I'd say it's harder to remove the latter, due to having to search for
> the end of comment sequence, rather tha
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Edward Elliott wrote:
>
>
> You can use either """ or '''. I don't keep changing them in my code, so
> I
> can always use the other type (usually I use " so for commenting things
> out
> I'd use ') to do that.
>
Try
Sion Arrowsmith wrote:
> Really? Under what circumstances is it easier to see what's going on
> with start/end comments than with comment-to-end-of-line?
Off the top of my head:
1. The code is usually easier to read as # can obscure the first token on
the line. This can be alleviated by leaving
"Edward Elliott" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ben Finney wrote:
>> Indeed. Using revision control means never needing to comment out
>> blocks of code.
>
> Typing (* and *) on a few line will always be quicker, easier, and less
> confusing than any rcs diffs/rest
Sion Arrowsmith wrote:
> I'd say it's harder to remove the latter, due to having to search for
> the end of comment sequence, rather than simply looking for where the
> block comment stops. And you've extra problems if you allow nested
> comments, because then you'll have to count how deep you've
Jorge Godoy <[EMAIL PROTECTED]> wrote:
>Is it harder to remove "n" lines of code commented out with "#" than "n"
>lines of multiline commented code? How?
I'd say it's harder to remove the latter, due to having to search for
the end of comment sequence, rather than simply looking for where the
bl
Edward Elliott <[EMAIL PROTECTED]> wrote:
>On top of that, the expressive power of nested comments seems greater than
>an endless string of ^#s. Sometimes it's just easier to see what's going on.
Really? Under what circumstances is it easier to see what's going on
with start/end comments than w
nice one Jorge :-)
Jorge Godoy wrote:
> Peter Tillotson wrote:
>
>> I'm not sure I agree, revision control is great but not the only answer.
>> In multi-developer teams working on the trunk, it its kind of
>> inconvenient if someone checks in broken code. It also blocks critical
>
> This is some
Edward Elliott wrote:
> And when the section I want to comment out contains a legit doc string in
> the middle, triple-quotes won't work. There are valid reasons to nest
You can use either """ or '''. I don't keep changing them in my code, so I
can always use the other type (usually I use " so
Peter Tillotson wrote:
> I'm not sure I agree, revision control is great but not the only answer.
> In multi-developer teams working on the trunk, it its kind of
> inconvenient if someone checks in broken code. It also blocks critical
This is something that should be a policy: no untested and wor
Edward Elliott wrote:
> Sure they can be abused. So can a thousand other language features. My
> point is you can't teach good coding through syntax, and trying to causes
> more problems than it solves.
I like the phrase: there are some languages that incentivates bad practices
in programming;
Edward Elliott wrote:
> Typing (* and *) on a few line will always be quicker, easier, and less
> confusing than any rcs diffs/restores. Once you delete the code you can
> no longer see it or add pieces back in without retrieving it from an
> external store.
Try using Subversion. You can work a
Ben Finney wrote:
> "Atanas Banov" <[EMAIL PROTECTED]> writes:
>
>> Edward Elliott wrote:
>>> Saying coders shouldn't use multiline comments to disable code
>>> misses the point. Coders will comment out code regardless of the
>>> existence of multiline comemnts. There has to be a better
>>> argu
Edward Elliott schrieb:
> On top of that, the expressive power of nested comments seems greater
> than an endless string of ^#s. Sometimes it's just easier to see what's
> going on.
not if you are using grep
--
Gregor
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/py
Duncan Booth wrote:
> Want to comment out a block of code in C++? The only (nearly) reliable way
> is to insert single-line comments down the block. You can't use a block
> comment if there are any other block comments inside the code you want to
> block out.
As Roel said, #if 0 is the standard
Duncan Booth schreef:
> Would you care to name a few languages which support nested block
> comments? There really aren't many: ML as you mentioned; Standard Pascal
> doesn't permit nesting of comments but *some* implementations do allow it.
>
> Want to comment out a block of code in C++? The onl
Edward Elliott wrote:
> Ben Finney wrote:
>> Indeed. Using revision control means never needing to comment out
>> blocks of code.
>
> Typing (* and *) on a few line will always be quicker, easier, and
> less confusing than any rcs diffs/restores. Once you delete the code
> you can no longer see
In article <[EMAIL PROTECTED]>,
Edward Elliott <[EMAIL PROTECTED]> wrote:
>ML has a
>very elegant system for nested comments with (* and *).
Which, if you mistype an opening or closing comment symbol, can lead to
some very mysterious syntax errors.
--
http://mail.python.org/mailman/listinfo/p
Ben Finney wrote:
> Indeed. Using revision control means never needing to comment out
> blocks of code.
Typing (* and *) on a few line will always be quicker, easier, and less
confusing than any rcs diffs/restores. Once you delete the code you can no
longer see it or add pieces back in without
Ben Finney wrote:
> And/or switch to an editor that can perform editing operations on a
> range of lines.
I'm not unsympathetic to this point of view, as I would feel hamstrung
without my vim. It's more that I object to the paternalism of telling
people they have to use such an editor. There a
Atanas Banov wrote:
> want to comment block of code? use tripple-quotes. does not nest? ahhh,
> maybe it's time to get rid of that block you commented out a month ago
> "just in case the new code doesnt work".
>
> that gives you incentive to tidy up. don't be a code slob... don't
> leave a mess fo
"Atanas Banov" <[EMAIL PROTECTED]> writes:
> Edward Elliott wrote:
> > Saying coders shouldn't use multiline comments to disable code
> > misses the point. Coders will comment out code regardless of the
> > existence of multiline comemnts. There has to be a better
> > argument for leaving them o
Edward Elliott wrote:
> At the risk of flogging a dead horse, I'm wondering why Python doesn't have
> any multiline comments. One can abuse triple-quotes for that purpose, but
> that's obviously not what it's for and doesn't nest properly.
...
> Saying coders shouldn't use multiline comments to d
James Stroud <[EMAIL PROTECTED]> writes:
> Edward Elliott wrote:
> > At the risk of flogging a dead horse, I'm wondering why Python
> > doesn't have any multiline comments. [...]
> >
> > Using an editor to throw #s in front of every line has
> > limitations. Your editor has to support it and you
Edward Elliott wrote:
> At the risk of flogging a dead horse, I'm wondering why Python doesn't
> have any multiline comments. One can abuse triple-quotes for that
> purpose, but that's obviously not what it's for and doesn't nest
> properly. ML has a very elegant system for nested comments wit
40 matches
Mail list logo