code: def close(self):
          
          conn = self.connection
          if conn is None:
              return
          try:
              while self.nextset():
                  pass
          finally:
              self.connection = None
docs: Closing a cursor just exhausts all remaining data.