【发布时间】:2016-08-30 03:19:17
【问题描述】:
我有一个如下所示的 python 文件(脚本):
script.py
"""
Multiline comment with unique
text pertaining to the Foo class
"""
class Foo():
pass
"""
Multiline comment with unique
text pertaining to the Bar class
"""
class Bar():
pass
"""
Multiline comment with unique
text pertaining to the FooBar class
"""
class FooBar():
pass
def print_comments():
# NotImplementedError
print_comments 有什么方法可以检测并输出所有未分配的字符串,以便我可以看到:
具有唯一性的多行注释 与 Foo 类有关的文本
具有唯一性的多行注释 与 Bar 类有关的文本
具有唯一性的多行注释 与 FooBar 类有关的文本
【问题讨论】:
标签: python string unassigned-variable