/pyjs/tests/test019.py
http://pyjamas.googlecode.com/ · Python · 20 lines · 17 code · 3 blank · 0 comment · 6 complexity · c6ccffc5c6ee341040743dcbfb791107 MD5 · raw file
- class Schedule:
- def __init__(self):
- self.timeSlots = []
- def addTimeSlot(self, timeSlot):
- self.timeSlots.append(timeSlot)
-
- def getDescription(self, daysFilter):
- s = None
- for timeSlot in self.timeSlots:
- if daysFilter[timeSlot.dayOfWeek]:
- if not s:
- s = timeSlot.getDescription()
- else:
- s += ", " + timeSlot.getDescription()
- if s:
- return s
- else:
- return ""