We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c26adef commit 2188203Copy full SHA for 2188203
amaranth/tracer.py
@@ -1,4 +1,5 @@
1
import sys
2
+import platform
3
from opcode import opname
4
5
@@ -44,13 +45,13 @@ def get_var_name(depth=2, default=_raise_exception):
44
45
return code.co_names[imm]
46
elif opc == "STORE_FAST":
47
imm |= int(code.co_code[index + 1])
- if sys.version_info >= (3, 11):
48
+ if sys.version_info >= (3, 11) and platform.python_implementation() == 'CPython':
49
return code._varname_from_oparg(imm)
50
else:
51
return code.co_varnames[imm]
52
elif opc == "STORE_DEREF":
53
54
55
56
57
if imm < len(code.co_cellvars):
0 commit comments