减少函数输入python的行长度

时间:2018-05-03 23:59:19

标签: python-3.x

我目前的行长太长了:

if the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName'] and the_client.mismatched['XfinName'] != None:

是否可以将其分为多行?

1 个答案:

答案 0 :(得分:1)

您可以在由括号

分组的表达式中添加换行符
if (the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName']
    and the_client.mismatched['XfinName'] != None):
    pass