Bri*_*ndt 4 python comments coding-style
在审查edX.org上的在线CS188.1x类中使用的一些代码(由教师编写的代码)时,我注意到重复使用一组双引号(如可能在str附近使用)用作注释.
我之前没有见过这个,也没有在PEP8中提到过我能找到的,但它看起来确实很好.任何人都可以开导我吗?
这是一个例子:
class SomeClass():
"""
Some docstring info, using standard 'triple double quotes'
"""
def __init__(self):
"This is the comment style to which I'm referring."
some.code = foo # Here's a normal inline comment
def bar(self, item):
"Here is another example of the comment style"
return wtf
Run Code Online (Sandbox Code Playgroud)