code: def messages(self):
          
          if self._session:
              result = []
              for msg in self._session.messages:
                  ex = _create_exception_by_message(msg)
                  result.append((type(ex), ex))
              return result
          else:
              return None
docs: Messages generated by server, see http://legacy.python.org/dev/peps/pep-0249/#cursor-messages