Skip to content

Commit

Permalink
fix ast2ast for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Oct 31, 2023
1 parent de77b21 commit 3652e7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qlasskit/ast2ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def visit_For(self, node):
iter = [
ast.Subscript(
value=ast.Name(id=iter.id, ctx=ast.Load()),
slice=ast.Constant(value=e),
slice=ast.Index(value=ast.Constant(value=e))
if sys.version_info < (3, 9)
else ast.Constant(value=e),
ctx=ast.Load(),
)
for e in range(len(_elts))
Expand Down

0 comments on commit 3652e7e

Please sign in to comment.