Python 3.x 减少函数输入python的行长度
我当前的线路长度太长:Python 3.x 减少函数输入python的行长度,python-3.x,Python 3.x,我当前的线路长度太长: if the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName'] and the_client.mismatched['XfinName'] != None: 是否可以将其分成多行?可以将换行符放在按括号分组的表达式中 if (the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName'] a
if the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName'] and the_client.mismatched['XfinName'] != None:
是否可以将其分成多行?可以将换行符放在按括号分组的表达式中
if (the_client.mismatched['NextGenName'] != the_client.mismatched['XfinName']
and the_client.mismatched['XfinName'] != None):
pass
x='XfinName';c=_客户端不匹配;如果c[x]和c['NextGenName']=c[x]:
要减少行长度还是将其分成多行?你的主要目标是什么?我只是想修正我关于线路长度的pylint警告。必须有比在内存中创建更多对象更好的方法。像我上面的评论一样,向vars
添加重复的代码,或者利用函数,这将显著减少代码大小,除此之外,我看不到您能做的任何其他重大改进。