[Python-ideas] Multi-line comment blocks.

David Gates gatesda at gmail.com
Sat Jun 16 15:37:10 CEST 2012

I was throwing together a quick language list, so I pulled some of them
from hyperpolyglot, including Perl.  So, guess it's not a dedicated comment
syntax, but it does nest (the document you linked says it doesn't, but it's

Found out that Lua also uses dead-code strings as comments.  It supports
nested strings, but the delimiters in each layer must be distinct.  Trying
to nest them otherwise is a syntax error, so you can't accidentally end a
string early like you can with quote delimiters.

On Sat, Jun 16, 2012 at 2:56 AM, Paul Moore <p.f.moore at gmail.com> wrote:

> On 16 June 2012 02:00, David Gates <gatesda at gmail.com> wrote:
> > A Perl nested comment:
> >
> > =for
> >   Comment
> >   =for
> >     Nested comment
> >   =cut
> > =cut
> And the irony is that, as far as I recall, this is a form of Perl's
> embedded documentation syntax (and hence very similar in spirit to
> using multiline strings as comments). See
> http://www.perl6.org/archive//rfc/5.html (and note that perl 6 does
> *not*, apparently, include multiline comments).
> Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120616/e9accf82/attachment.html>

More information about the Python-ideas mailing list