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