def check_string(result, func, cargs):
 if (not result):
  raise GEOSException(('Error encountered checking string return value in GEOS C function "%s".' % func.__name__))
 s = string_at(result)
 free(result)
 return s

def check_string ( result , func , cargs ) : if ( not result ) : raise GEOSException ( ( 'Error encountered checking string return value in GEOS C function "%s".' % func . __name__ ) ) s = string_at ( result ) free ( result ) return s
error checking for routines that return strings .