Use "is" when comparing types

This commit is contained in:
Andrew Murray 2023-08-08 08:44:03 +10:00
parent 24a19e5b37
commit 15930be644

View File

@ -247,7 +247,7 @@ def eval(expression, _dict={}, **kw):
def scan(code): def scan(code):
for const in code.co_consts: for const in code.co_consts:
if type(const) == type(compiled_code): if type(const) is type(compiled_code):
scan(const) scan(const)
for name in code.co_names: for name in code.co_names: