Skip to content
Snippets Groups Projects
Commit 491be46e authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Use isinstance(...) over type(...) ==

parent 28d0e77d
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ def show_code(code, indent=""):
yield f"{indent}consts"
for const in code.co_consts:
if type(const) == types.CodeType:
if isinstance(const, types.CodeType):
yield from show_code(const, f"{indent} ")
else:
yield f" {indent}{const!r}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment