Ignore:
Timestamp:
7 Feb 2009, 00:18:58 (16 years ago)
Author:
uli
Message:

Remove getId from facultycontainer: it overcomplicates things.

Location:
waeup/branches/ulif-rewrite/src/waeup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/interfaces.py

    r3918 r3922  
    4141    """A container for faculties.
    4242    """
    43     def getId(faculty):
    44         """Get a unique id for a faculty.
    45         """
    46 
    4743    def addFaculty(faculty):
    4844        """Add an IFactulty object.
     45
     46        Returns the key, under which the object was stored.
    4947        """
    5048   
  • waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.py

    r3920 r3922  
    1616    next_id = 0L
    1717   
    18     def getId(self, faculty):
    19         """We need a unified id for each faculty, which acts as key.
    20         """
    21         return str(self.next_id)
    22    
    2318    def addFaculty(self, faculty):
    2419        if not IFaculty.providedBy(faculty):
    2520            raise TypeError('FacultyContainers contain only IFaculty instances')
    26         id = self.getId(faculty)
     21        id = str(self.next_id)
    2722        self[id] = faculty
    2823        while self.next_id in self.keys():
Note: See TracChangeset for help on using the changeset viewer.