Next / Previous / Contents / TCC Help System / NM Tech homepage

22.2. PriIndex.effByYear(): Sorting function for effort records

Used to sort a list of effort records by year.

cbchistlib.py
# - - -   P r i E n t r y . e f f B y Y e a r

    @staticmethod
    def effByYear(eff1, eff2):
        '''Order Effort instances by (year_no, year_key)
        '''
        return cmp((eff1.year_no, eff1.year_key),
                   (eff2.year_no, eff2.year_key))