由于代码风格各种混乱,我喜欢的是类 c 的风格
def fun(input1, input2, output)
if input1:
output.append(123)
return True
else:
return False
可是也有朋友喜欢在 fun 中直接raise 一下
try:
output = fun()
except:
#do what if false
你们是怎么看的呢
def fun(input1, input2, output)
if input1:
output.append(123)
return True
else:
return False
可是也有朋友喜欢在 fun 中直接raise 一下
try:
output = fun()
except:
#do what if false
你们是怎么看的呢