【发布时间】:2018-07-16 05:36:35
【问题描述】:
当使用 PyCharm 注释掉文本时(通过选择文本并点击键盘快捷键),它使用普通的# cmets,如下所示:
我不喜欢这看起来与实际 cmets 有多么相似(即我解释我的代码做了什么),所以它想使用不同风格的 cmets (##) 来注释掉代码:
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 中自定义这样的评论样式?
【问题讨论】: