Skip to content

Commit

Permalink
Merge pull request #1199 from dufferzafar/pathod-generator-hotfix
Browse files Browse the repository at this point in the history
Handle the slice object case in TransformGenerator.__getitem__
  • Loading branch information
Kriechi committed Jun 2, 2016
2 parents 66ec194 + 8e60a9b commit b9ad7be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pathod/language/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def __len__(self):

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):
Expand Down

0 comments on commit b9ad7be

Please sign in to comment.