[Python-Dev] Can we triple quoted string as a comment? (original) (raw)
Victor Stinner victor.stinner at gmail.com
Mon Mar 25 22:16:19 CET 2013
- Previous message: [Python-Dev] Simple IDLE issues to commit before Python 2.7.4 release in two weeks on 4/6/2013
- Next message: [Python-Dev] Can we triple quoted string as a comment?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
(IMO a comment should be used instead.)
Victor
- Previous message: [Python-Dev] Simple IDLE issues to commit before Python 2.7.4 release in two weeks on 4/6/2013
- Next message: [Python-Dev] Can we triple quoted string as a comment?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]