def check_zero(result, func, cargs):
 if (result == 0):
  raise GEOSException(('Error encountered in GEOS C function "%s".' % func.__name__))
 else:
  return result

def check_zero ( result , func , cargs ) : if ( result == 0 ) : raise GEOSException ( ( 'Error encountered in GEOS C function "%s".' % func . __name__ ) ) else : return result
error checking on routines that should not return 0 .