From c65df143b98feaa20a34f4e493c2b5049840e264 Mon Sep 17 00:00:00 2001 From: John Jacobsen Date: Sun, 21 Apr 2013 15:47:45 -0500 Subject: [PATCH] Simplify 'take' --- hy/compiler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index 5a76bea..d3c8a61 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -679,14 +679,11 @@ class HyASTCompiler(object): expr.pop(0) n = 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( lineno=expr.start_line, col_offset=expr.start_column, value=seq, - slice=ast.Slice(lower=zero, + slice=ast.Slice(lower=None, upper=n, step=None), ctx=ast.Load())