[Python-Dev] Can we triple quoted string as a comment?

Gregory P. Smith greg at krypto.org
Mon Mar 25 22:22:39 CET 2013


On Mon, Mar 25, 2013 at 2:16 PM, Victor Stinner <victor.stinner at gmail.com>wrote:

> Hi,
>
> I just realized that the Python peephole optimizer removes useless
> instructions like numbers and strings between other instructions,
> without raising an error nor emiting an error. Example:
>
> $ python -Wd -c 'print "Hello"; "World"'
> Hello
>
> As part of my astoptimizer project, I wrote a function to detect such
> useless instructions which emit a warning. I opened the following
> issue to report what I found:
> http://bugs.python.org/issue17516
>
> Different modules use long strings as comments. What is the "official"
> policy about such strings? Should we use strings or comments?
>

Comments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130325/abf55dc9/attachment.html>


More information about the Python-Dev mailing list