Merge pull request #84 from python-pitfalls/master

Removed a simple pitfall case of a consider-using-in case
This commit is contained in:
Linwei authored and GitHub committed 2021-11-03 09:11:19 +08:00
commit 590bbf1295
1 file changed
+1 -1
+1 -1
View File
@@ -1786,7 +1786,7 @@ def convert_dict(dstname, srcname):
if x <= 0: if x <= 0:
data['collins'] = None data['collins'] = None
elif isinstance(x, str) or isinstance(x, unicode): elif isinstance(x, str) or isinstance(x, unicode):
if x == '' or x == '0': if x in ('', '0'):
data['collins'] = None data['collins'] = None
dst.register(word, data, False) dst.register(word, data, False)
dst.commit() dst.commit()