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 baa92a0 commit 900cf06Copy full SHA for 900cf06
bpython/simpleeval.py
@@ -161,10 +161,10 @@ def _convert(node):
161
index = _convert(node.slice.value)
162
return safe_getitem(obj, index)
163
elif sys.version_info[:2] >= (3, 9) and isinstance(node, ast.Subscript) and isinstance(
164
- node.slice, ast.Constant
+ node.slice, (ast.Constant, ast.Name)
165
):
166
obj = _convert(node.value)
167
- index = node.slice.value
+ index = _convert(node.slice)
168
169
170
# this is a deviation from literal_eval: we allow attribute access
0 commit comments