[Python-ideas] Multi-line comment blocks.
gatesda at gmail.com
Sat Jun 16 02:28:39 CEST 2012
Perl, Ruby, Lisps, OCaml, F#, Haskell, and I believe Pascal. There are
probably others. None of these use significant indentation; they're just
smart enough to not ignore beginning delimiters within multi-line comments.
On Fri, Jun 15, 2012 at 5:47 PM, Guido van Rossum <guido at python.org> wrote:
> On Fri, Jun 15, 2012 at 4:07 PM, Carl Meyer <carl at oddbird.net> wrote:
> > On 06/15/2012 04:51 PM, Guido van Rossum wrote:
> >> On Fri, Jun 15, 2012 at 3:47 PM, David Gates <gatesda at gmail.com> wrote:
> >>> My proposal wasn't for people who hand-code the single-line comment
> >>> but for those that use multi-line string comments. Since the
> >>> string hack's BDFL-approved, people will use it and other people will
> >>> to deal with it.
> >> What's wrong with it?
> > The reason I discourage using multi-line strings as comments is that
> > they don't nest (which I think David mentioned earlier). If you've got a
> > short multi-line-string-as-comment in the middle of a function, and then
> > you try to use multi-line-string technique to comment out that entire
> > function, you don't get what you want, you get a syntax error as your
> > short comment is now parsed as code.
> > (FWIW, I don't think this means Python needs a dedicated syntax for
> > multi-line comments, I think multiple lines beginning with # works just
> > fine.)
> In which languages do multi-line comments nest? AFAIK not in the
> --Guido van Rossum (python.org/~guido)
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas