code: def as_float(self):
          '''Get as a float (year being the integer part).
  
          Replace '?' in year with 9 so as to be conservative (e.g. 19?? becomes
          1999) and elsewhere (month, day) with 0
  
          @return: float.
          '''
          if not self.year:
              return None
          out = float(self.year.replace('?', '9'))
          if self.month:
              # TODO: we are assuming months are of equal length
              out += float(self.month.replace('?', '0')) / 12.0
              if self.day:
                  out += float(self.day.replace('?', '0')) / 365.0
          return ouf as_float(self):
          '''Get as a float (year being the integer part).
  
          Replace '?' in year with 9 so as to be conservative (e.g. 19?? becomes
          1999) and elsewhere (month, day) with 0
  
          @return: float.
          '''
          if not self.year:
              return None
          out = float(self.year.replace('?', '9'))
          if self.month:
              # TODO: we are assuming months are of equal length
              out += float(self.month.replace('?', '0')) / 12.0
              if self.day:
                  out += float(self.day.replace('?', '0')) / 365.0
          return out
docs: Get as a float (year being the integer part).
  
          Replace '?' in year with 9 so as to be conservative (e.g. 19?? becomes
          1999) and elsewhere (month, day) with 0
  
          @return: float.