Skip to content

Commit

Permalink
ast.Ellipsis check predicated by Python < 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnick83 committed Oct 8, 2023
1 parent e4288ed commit 6afee58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dace/frontend/python/memlet_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved.
import ast
import copy
import re
import sys
from collections import namedtuple
from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass
Expand Down Expand Up @@ -114,7 +114,7 @@ def _fill_missing_slices(das, ast_ndslice, array, indices):
offsets.append(idx)
idx += 1
new_idx += 1
elif (isinstance(dim, ast.Ellipsis) or dim is Ellipsis
elif ((sys.version_info < (3, 8) and isinstance(dim, ast.Ellipsis)) or dim is Ellipsis
or (isinstance(dim, ast.Constant) and dim.value is Ellipsis)
or (isinstance(dim, ast.Name) and dim.id is Ellipsis)):
if has_ellipsis:
Expand Down

0 comments on commit 6afee58

Please sign in to comment.