[Python-ideas] Multi-line comment blocks.

Bruce Leban bruce at leapyear.org
Sat Jun 16 06:28:33 CEST 2012


On Fri, Jun 15, 2012 at 8:48 PM, Devin Jeanpierre <jeanpierreda at gmail.com>wrote:

> On Fri, Jun 15, 2012 at 11:26 PM, Bruce Leban <bruce at leapyear.org> wrote:
> > For commenting out part of a line I think best practice is duplicating
> the
> > entire line as a comment and editing it directly. That handles scenarios
> > that inline comments don't and more importantly ensures reverting is
> error
> > free.
>
> I suppose so. So far I've done pretty much exactly what I wrote, and
> used the undo buffer for safety.
>
> Undo is dangerous because in most editors it will undo other intervening
changes to other parts of the program. You make a change like this to find
a bug, then find and fix the bug. Undo will remove the fix.


> Agreed. But even if multiline/inline comments were added you'd still have
> > that problem, right?
>
> I don't see why this problem would exist for comments. Comments do not
> have a (common) culture or behaviour of meaning anything else other
> than comments, whereas triple-quoted strings have three purposes:
>

I meant that even if new comment syntax were added, string-style comments
wouldn't be going away anytime soon. There's a high bar for adding features
and an even higher bar for removing them. So tools will need handle the
current string comments for quite a while as well as being modified to
parse any new comment syntax.

--- Bruce
Follow me: http://www.twitter.com/Vroo http://www.vroospeak.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120615/61987ea9/attachment.html>


More information about the Python-ideas mailing list