code: def getopt(self, p, default=None):
          
          for k, v in self.pairs:
              if k == p:
                  return v
          return default
docs: Returns the first option value stored that matches p or default.