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 bc1c2ae commit e5a022fCopy full SHA for e5a022f
nibabel/nicom/ascconv.py
@@ -89,7 +89,10 @@ def assign2atoms(assign_ast, default_class=int):
89
target = target.value
90
prev_target_type = OrderedDict
91
elif isinstance(target, ast.Subscript):
92
- index = target.slice.value.n
+ if isinstance(target.slice, ast.Constant): # PY39
93
+ index = target.slice.n
94
+ else: # PY38
95
+ index = target.slice.value.n
96
atoms.append(Atom(target, prev_target_type, index))
97
98
prev_target_type = list
0 commit comments