Mercurial > hg > lxmldump
changeset 83:a42e0ca2277f
Use is/is not for comparing to None.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 24 Jun 2022 18:53:17 +0300 |
parents | c876f8872552 |
children | 1cb41a6cd1cd |
files | lxmldump.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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))