@dual_decorator
def enforce_ids_param(position=1):
 @decorator
 def wrapper(function, *args, **kw):
  if ((not isinstance(args[position], (list, tuple))) or (not all([isinstance(e, basestring) for e in args[position]]))):
   raise ValueError((u'Invalid param type in position %s; expected ids (did you pass dictionaries?)' % position))
  return function(*args, **kw)
 return wrapper

@ dual_decorator def enforce_ids_param ( position = 1 ) : @ decorator def wrapper ( function , * args , ** kw ) : if ( ( not isinstance ( args [ position ] , ( list , tuple ) ) ) or ( not all ( [ isinstance ( e , basestring ) for e in args [ position ] ] ) ) ) : raise ValueError ( ( u'Invalid param type in position %s; expected ids (did you pass dictionaries?)' % position ) ) return function ( * args , ** kw ) return wrapper
verifies that the caller is passing a list of song ids .