From: Sergey Matveev Date: Tue, 11 Feb 2020 10:48:07 +0000 (+0300) Subject: is comparison is slightly faster X-Git-Tag: 7.0~26 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=f7a92debecda42633ba9a7c320eaaa81871a4d49 is comparison is slightly faster --- diff --git a/pyderasn.py b/pyderasn.py index 53e7abf..fcaa5a6 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -5134,7 +5134,7 @@ def get_def_by_path(defines_by_path, sub_decode_path): if len(path) != len(sub_decode_path): continue for p1, p2 in zip(path, sub_decode_path): - if (p1 != any) and (p1 != p2): + if (not p1 is any) and (p1 != p2): break else: return define