def _set_select_from(self, obj, set_base_alias):
    fa = []
    select_from_alias = None
    for from_obj in obj:
        info = inspect(from_obj)
        if (hasattr(info, 'mapper') and (info.is_mapper or info.is_aliased_class)):
            self._select_from_entity = from_obj
            if set_base_alias:
                raise sa_exc.ArgumentError('A selectable (FromClause) instance is expected when the base alias is being set.')
            fa.append(info.selectable)
        elif (not info.is_selectable):
            raise sa_exc.ArgumentError('argument is not a mapped class, mapper, aliased(), or FromClause instance.')
        else:
            if isinstance(from_obj, expression.SelectBase):
                from_obj = from_obj.alias()
            if set_base_alias:
                select_from_alias = from_obj
            fa.append(from_obj)
    self._from_obj = tuple(fa)
    if (set_base_alias and (len(self._from_obj) == 1) and isinstance(select_from_alias, expression.Alias)):
        equivs = self.__all_equivs()
        self._from_obj_alias = sql_util.ColumnAdapter(self._from_obj[0], equivs)
def _set_select_from(self, obj, set_base_alias):
    fa = []
    select_from_alias = None
    for from_obj in obj:
        info = inspect(from_obj)
        if (hasattr(info, 'mapper') and (info.is_mapper or info.is_aliased_class)):
            self._select_from_entity = from_obj
            if set_base_alias:
                raise sa_exc.ArgumentError('A selectable (FromClause) instance is expected when the base alias is being set.')
            fa.append(info.selectable)
        elif (not info.is_selectable):
            raise sa_exc.ArgumentError('argument is not a mapped class, mapper, aliased(), or FromClause instance.')
        else:
            if isinstance(from_obj, expression.SelectBase):
                from_obj = from_obj.alias()
            if set_base_alias:
                select_from_alias = from_obj
            fa.append(from_obj)
    self._from_obj = tuple(fa)
    if (set_base_alias and (len(self._from_obj) == 1) and isinstance(select_from_alias, expression.Alias)):
        equivs = self.__all_equivs()
        self._from_obj_alias = sql_util.ColumnAdapter(self._from_obj[0], equivs)