Skip to content

Commit

Permalink
Delegate missing attributes to original dataset object
Browse files Browse the repository at this point in the history
  • Loading branch information
msamogh committed Jul 19, 2019
1 parent 69af86f commit 26382f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nonechucks/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ def __getitem__(self, idx):
return sample
idx += 1
raise IndexError

def __getattr__(self, key):
"""Delegates to original dataset object if an attribute is not
found in this class.
"""
return getattr(self.dataset, key)

0 comments on commit 26382f0

Please sign in to comment.