当用PyCharm注释掉文本时(通过选择文本并点击键盘快捷键),它使用普通的#
注释,如下所示:
我不喜欢这看起来和实际的注释有多相似(例如,我解释代码的作用),所以它希望使用不同风格的注释(##
)来注释代码:
def execute_evil_master_plan():
## # Start by hijacking a government satellite.
## # Doesn't matter which as long as it has a death laser.
## satellite = hijack_government_satellite()
##
## # aim it towards the white house and fire the laser
## coords = google_maps.get_coordinates(WHITE_HOUSE)
## satellite.aim(target=coords)
## satellite.fire()
有没有办法在PyCharm中定制这样的评论风格?在
在多行注释前后使用“”。在
相关问题 更多 >
编程相关推荐