Simplify 'take'
This commit is contained in:
parent
f69c6243e8
commit
c65df143b9
@ -679,14 +679,11 @@ class HyASTCompiler(object):
|
|||||||
expr.pop(0)
|
expr.pop(0)
|
||||||
n = self.compile(expr.pop(0))
|
n = self.compile(expr.pop(0))
|
||||||
seq = self.compile(expr.pop(0))
|
seq = self.compile(expr.pop(0))
|
||||||
zero = ast.Num(n=0,
|
|
||||||
lineno=expr.start_column,
|
|
||||||
col_offset=expr.start_column)
|
|
||||||
return ast.Subscript(
|
return ast.Subscript(
|
||||||
lineno=expr.start_line,
|
lineno=expr.start_line,
|
||||||
col_offset=expr.start_column,
|
col_offset=expr.start_column,
|
||||||
value=seq,
|
value=seq,
|
||||||
slice=ast.Slice(lower=zero,
|
slice=ast.Slice(lower=None,
|
||||||
upper=n,
|
upper=n,
|
||||||
step=None),
|
step=None),
|
||||||
ctx=ast.Load())
|
ctx=ast.Load())
|
||||||
|
Loading…
Reference in New Issue
Block a user