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

49. class EffortKey: A unique key for the effort table

This package encapsulates the two fields that uniquely specify one effort in the database: the year number and the year key.

cbchistlib.py
# - - - - -   c l a s s   E f f o r t K e y

class EffortKey(object):
    '''Represents the unique key for the effort table.

      Exports:
        EffortKey(year_no, year_key):
          [ (year_no is a year number value from pycbc) and
            (year_key is a year key value from pycbc) ->
              return a new EffortKey instance representing those
              values ]
        .year_no:      [ as passed to constructor, read-only ]
        .year_key:     [ as passed to constructor, read-only ]
        .key:          [ self.year_no + self.year_key ]
        .__cmp__(self, other):
          [ usual comparison method, ascending order, primary
            key the year number, secondary key the year key ]
        .__str__(self):
          [ return a string representation of self ]
    '''