[issue17516] Dead code should be removed
R. David Murray
report at bugs.python.org
Sun Mar 24 19:16:06 CET 2013
R. David Murray added the comment:
> Oh, it looks like you are right: useless strings are already removed
> during compilation. But it looks a little bit surprising to me to use a
> multiline string for a comment. I prefer classic # comments.
I was surprised by this as well. I think the comment in _header_value_parser was originally a docstring and got moved around during editing. It should probably get changed to a block comment.
I could have sworn that when I learned about the optimization it was in the context of documentation that specifically said the optimization was done so that triple quoted strings could be used as multi-line comments, but I cannot find it through google or guessing where I might have seen it in our docs, so perhaps I was imagining things.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17516>
_______________________________________
More information about the Python-bugs-list
mailing list