Handle the slice object case in TransformGenerator.__getitem__

This commit is contained in:
Shadab Zafar 2016-06-03 02:00:58 +05:30
parent 66ec1940ac
commit 8e60a9bca9

View File

@ -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):