def validate_positive_scalars(**kwargs):
 for (key, val) in kwargs.items():
  try:
   if (val <= 0):
    raise ValueError('{} must be > 0, got {}'.format(key, val))
  except TypeError:
   raise exceptions.PlotlyError('{} must be a number, got {}'.format(key, val))

def validate_positive_scalars ( ** kwargs ) : for ( key , val ) in kwargs . items ( ) : try : if ( val <= 0 ) : raise ValueError ( '{} must be > 0, got {}' . format ( key , val ) ) except TypeError : raise exceptions . PlotlyError ( '{} must be a number, got {}' . format ( key , val ) )
validates that all values given in key/val pairs are positive .