def AsIter(arg):
 if isinstance(arg, basestring):
  rslt = [arg]
 elif isinstance(arg, collections.Iterable):
  rslt = arg
 elif (not arg):
  rslt = []
 else:
  rslt = [arg]
 return tuple(rslt)

def AsIter ( arg ) : if isinstance ( arg , basestring ) : rslt = [ arg ] elif isinstance ( arg , collections . Iterable ) : rslt = arg elif ( not arg ) : rslt = [ ] else : rslt = [ arg ] return tuple ( rslt )
encapsulates an argument in a tuple .