code: def keys(self):
          
          if ver == (2, 7):
              return self.viewkeys()
          elif ver == (2, 6):
              return self.iterkeys()
          elif ver >= (3, 0):
              return self.keys()
docs: On Python 2.7+:
              D.keys() -> a set-like object providing a view on D's keys
          On Python 2.6:
              D.keys() -> an iterator over D's keys