This question already has an answer here:
(这个问题在这里已有答案:)
Is there a mechanism to comment out large blocks of Python code?
(有没有一种机制可以注释掉大块的Python代码?)
Right now, the only ways I can see of commenting out code are to either start every line with a #
, or to enclose the code in triple quotes: """
.
(现在,我可以看到注释代码的唯一方法是使用#
开始每一行,或者用三引号括起代码: """
。)
The problem with these is that inserting #
before every line is cumbersome and """
makes the string I want to use as a comment show up in generated documentation.
(这些问题是在每行之前插入#
很麻烦, """
使得我想用作注释的字符串出现在生成的文档中。)
After reading all comments, the answer seems to be "No".
(阅读完所有评论后,答案似乎是“不”。)
ask by gbarry translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…