# HG changeset patch # User Matti Hamalainen # Date 1656085997 -10800 # Node ID a42e0ca2277f1c5dfad6558e27ea65b6a22d54be # Parent c876f88725528c465bee131910448312f15afd8d Use is/is not for comparing to None. diff -r c876f8872552 -r a42e0ca2277f lxmldump.py --- a/lxmldump.py Fri Jun 24 18:19:03 2022 +0300 +++ b/lxmldump.py Fri Jun 24 18:53:17 2022 +0300 @@ -270,11 +270,11 @@ ## Get default value per mode def pkk_get_value(mid): - if mid in pkk_settings and pkk_settings[mid] != None: + if mid in pkk_settings and pkk_settings[mid] is not None: return pkk_settings[mid] mmode = pkk_test_value(mid) - if mmode == None: + if mmode is None: pkk_fatal(f"Internal error: No mode for ID '{mid}'.") return pkk_mode_defaults[mid][mmode] @@ -448,7 +448,7 @@ # Get hyphenation note, if any hnode = wnode.find("./Hyphenation") - if hnode != None: + if hnode is not None: hyphenation = pkk_get_fmt("hyphenation").format( text=pkk_node_to_text(hnode), indent=pkk_geti(indent + 1))