Changeset 3920
- Timestamp:
- 7 Feb 2009, 00:03:27 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py
r3919 r3920 19 19 """We need a unified id for each faculty, which acts as key. 20 20 """ 21 return s elf.next_id21 return str(self.next_id) 22 22 23 23 def addFaculty(self, faculty): 24 24 if not IFaculty.providedBy(faculty): 25 25 raise TypeError('FacultyContainers contain only IFaculty instances') 26 self[self.next_id] = faculty 27 self.next_id += 1 26 id = self.getId(faculty) 27 self[id] = faculty 28 while self.next_id in self.keys(): 29 # Look for next unused int... 30 self.next_id += 1 31 return id 28 32 29 33 # We register FacultyContainer as a utility. This way we can
Note: See TracChangeset for help on using the changeset viewer.