def _aslist(obj):
 if (obj is None):
  return []
 elif isinstance(obj, (list, tuple)):
  return obj
 else:
  return [obj]

def _aslist ( obj ) : if ( obj is None ) : return [ ] elif isinstance ( obj , ( list , tuple ) ) : return obj else : return [ obj ]
turn object into a list; lists and tuples are left as-is .