def __getattr__(self, name):
    try:
      # Return 1 if value in day_of_week is True, 0 otherwise
      return (self.day_of_week[self._DAYS_OF_WEEK.index(name)]
              and 1 or 0)
    except __HOLE__:
      pass
    except ValueError:  # not a day of the week
      pass
    raise AttributeError(name)
dataset/ETHPy150Open google/transitfeed/transitfeed/serviceperiod.py/ServicePeriod.__getattr__