def warn_or_raise(warning_class, exception_class=None, args=(), config=None, pos=None, stacklevel=1):
 if (config is None):
  config = {}
 if config.get(u'pedantic'):
  if (exception_class is None):
   exception_class = warning_class
  vo_raise(exception_class, args, config, pos)
 else:
  vo_warn(warning_class, args, config, pos, stacklevel=(stacklevel + 1))

def warn_or_raise ( warning_class , exception_class = None , args = ( ) , config = None , pos = None , stacklevel = 1 ) : if ( config is None ) : config = { } if config . get ( u'pedantic' ) : if ( exception_class is None ) : exception_class = warning_class vo_raise ( exception_class , args , config , pos ) else : vo_warn ( warning_class , args , config , pos , stacklevel = ( stacklevel + 1 ) )
warn or raise an exception .