From 8e60a9bca9a14a9b3393b82927c56cdb13e1e8c8 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Fri, 3 Jun 2016 02:00:58 +0530 Subject: [PATCH] Handle the slice object case in TransformGenerator.__getitem__ --- pathod/language/generators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pathod/language/generators.py b/pathod/language/generators.py index 01f709e2b..9fff3082f 100644 --- a/pathod/language/generators.py +++ b/pathod/language/generators.py @@ -37,6 +37,8 @@ class TransformGenerator(object): def __getitem__(self, x): d = self.gen.__getitem__(x) + if isinstance(x, slice): + return self.transform(x.start, d) return self.transform(x, d) def __repr__(self):