Skip to content

Commit

Permalink
remove no longer required special code for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
d-maurer committed Apr 1, 2020
1 parent d42b8b4 commit 2cc0dc0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/RestrictedPython/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,6 @@ def transform_slice(self, slice_):
dims.elts.append(self.transform_slice(item))
return dims

# Python 3.9.0a5+ for `a[b]`, `a['b']` resp. `a[1,2]`:
elif isinstance(slice_, (ast.Name, ast.Constant, ast.Tuple)):
return slice_

else: # pragma: no cover
# Index, Slice and ExtSlice are only defined Slice types.
raise NotImplementedError("Unknown slice type: {0}".format(slice_))
Expand Down

0 comments on commit 2cc0dc0

Please sign in to comment.