def make_label_dec(label, ds=None):
 warnings.warn('The function `make_label_dec` is deprecated since IPython 4.0', DeprecationWarning, stacklevel=2)
 if isinstance(label, str):
  labels = [label]
 else:
  labels = label
 tmp = (lambda : None)
 for label in labels:
  setattr(tmp, label, True)
 def decor(f):
  for label in labels:
   setattr(f, label, True)
  return f
 if (ds is None):
  ds = ('Labels a test as %r.' % label)
 decor.__doc__ = ds
 return decor

def make_label_dec ( label , ds = None ) : warnings . warn ( 'The function `make_label_dec` is deprecated since IPython 4.0' , DeprecationWarning , stacklevel = 2 ) if isinstance ( label , str ) : labels = [ label ] else : labels = label tmp = ( lambda : None ) for label in labels : setattr ( tmp , label , True ) def decor ( f ) : for label in labels : setattr ( f , label , True ) return f if ( ds is None ) : ds = ( 'Labels a test as %r.' % label ) decor . __doc__ = ds return decor
factory function to create a decorator that applies one or more labels .