Quantcast
Channel: Visual Studio Code
Viewing all articles
Browse latest Browse all 598

vscode Python 代码格式化最好的方案

$
0
0

大家好 刚接触 python 不知道大家有没有遇到这个问题 比如我刚写了一个方法:

def test:
    num = 5     
    if num == 3:  
       print 'boss'  
    else:
       print 'roadman' 

现在我要用一个 try catch 包裹处理逻辑 但是问题来了 我添加 try catch 后 无法格式化 比如代码只会自动缩进第一行 如果我这个方法很多行 那么我目前只能手动缩进对齐 是否有更好的方法是我不知道的 谢谢大家


Viewing all articles
Browse latest Browse all 598

Trending Articles