def aliased(element, alias=None, name=None, flat=False, adapt_on_names=False):
 if isinstance(element, expression.FromClause):
  if adapt_on_names:
   raise sa_exc.ArgumentError('adapt_on_names only applies to ORM elements')
  return element.alias(name, flat=flat)
 else:
  return AliasedClass(element, alias=alias, flat=flat, name=name, adapt_on_names=adapt_on_names)

def aliased ( element , alias = None , name = None , flat = False , adapt_on_names = False ) : if isinstance ( element , expression . FromClause ) : if adapt_on_names : raise sa_exc . ArgumentError ( 'adapt_on_names only applies to ORM elements' ) return element . alias ( name , flat = flat ) else : return AliasedClass ( element , alias = alias , flat = flat , name = name , adapt_on_names = adapt_on_names )
produce an alias of the given element .