[Python-ideas] Multi-line comment blocks.

David Gates gatesda at gmail.com
Fri Jun 15 10:49:18 CEST 2012

Multi-line strings as comments don't nest, don't play well with docstrings,
and are counter-intuitive when there's special language support for
single-line comments. Python should only have one obvious way to do things,
and Python has two ways to comment, only one of which is obvious. My
suggestion is to add language support for comment blocks, using Python's
existing comment delimiter:

# Single-line comment
    Multi-line comment
        Nested multi-line comments work perfectly
        Of course they do, they're just nested blocks
    def foo():
        """Docstrings work perfectly. Why wouldn't they?"""
# No need for an end-delimiter like """ or */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120615/84005c9f/attachment.html>

More information about the Python-ideas mailing list