def __init__(self,
                 columns=None,
                 whereclause=None,
                 from_obj=None,
                 distinct=False,
                 having=None,
                 correlate=True,
                 prefixes=None,
                 **kwargs):
        """Construct a new :class:`.Select`.

        Similar functionality is also available via the
        :meth:`.FromClause.select` method on any :class:`.FromClause`.

        All arguments which accept :class:`.ClauseElement` arguments also
        accept string arguments, which will be converted as appropriate into
        either :func:`text()` or :func:`literal_column()` constructs.

        .. seealso::

            :ref:`coretutorial_selecting` - Core Tutorial description of
            :func:`.select`.

        :param columns:
          A list of :class:`.ColumnElement` or :class:`.FromClause`
          objects which will form the columns clause of the resulting
          statement.   For those objects that are instances of
          :class:`.FromClause` (typically :class:`.Table` or :class:`.Alias`
          objects), the :attr:`.FromClause.c` collection is extracted
          to form a collection of :class:`.ColumnElement` objects.

          This parameter will also accept :class:`.Text` constructs as
          given, as well as ORM-mapped classes.

          .. note::

            The :paramref:`.select.columns` parameter is not available
            in the method form of :func:`.select`, e.g.
            :meth:`.FromClause.select`.

          .. seealso::

            :meth:`.Select.column`

            :meth:`.Select.with_only_columns`

        :param whereclause:
          A :class:`.ClauseElement` expression which will be used to form the
          ``WHERE`` clause.   It is typically preferable to add WHERE
          criterion to an existing :class:`.Select` using method chaining
          with :meth:`.Select.where`.

          .. seealso::

            :meth:`.Select.where`

        :param from_obj:
          A list of :class:`.ClauseElement` objects which will be added to the
          ``FROM`` clause of the resulting statement.  This is equivalent
          to calling :meth:`.Select.select_from` using method chaining on
          an existing :class:`.Select` object.

          .. seealso::

            :meth:`.Select.select_from` - full description of explicit
            FROM clause specification.

        :param autocommit:
          Deprecated.  Use ``.execution_options(autocommit=<True|False>)``
          to set the autocommit option.

          .. seealso::

            :meth:`.Executable.execution_options`

        :param bind=None:
          an :class:`~.Engine` or :class:`~.Connection` instance
          to which the
          resulting :class:`.Select` object will be bound.  The
          :class:`.Select` object will otherwise automatically bind to
          whatever :class:`~.base.Connectable` instances can be located within
          its contained :class:`.ClauseElement` members.

        :param correlate=True:
          indicates that this :class:`.Select` object should have its
          contained :class:`.FromClause` elements "correlated" to an enclosing
          :class:`.Select` object.  It is typically preferable to specify
          correlations on an existing :class:`.Select` construct using
          :meth:`.Select.correlate`.

          .. seealso::

            :meth:`.Select.correlate` - full description of correlation.

        :param distinct=False:
          when ``True``, applies a ``DISTINCT`` qualifier to the columns
          clause of the resulting statement.

          The boolean argument may also be a column expression or list
          of column expressions - this is a special calling form which
          is understood by the Postgresql dialect to render the
          ``DISTINCT ON (<columns>)`` syntax.

          ``distinct`` is also available on an existing :class:`.Select`
          object via the :meth:`~.Select.distinct` method.

          .. seealso::

            :meth:`.Select.distinct`

        :param for_update=False:
          when ``True``, applies ``FOR UPDATE`` to the end of the
          resulting statement.

          .. deprecated:: 0.9.0 - use
             :meth:`.Select.with_for_update` to specify the
             structure of the ``FOR UPDATE`` clause.

          ``for_update`` accepts various string values interpreted by
          specific backends, including:

          * ``"read"`` - on MySQL, translates to ``LOCK IN SHARE MODE``;
            on Postgresql, translates to ``FOR SHARE``.
          * ``"nowait"`` - on Postgresql and Oracle, translates to
            ``FOR UPDATE NOWAIT``.
          * ``"read_nowait"`` - on Postgresql, translates to
            ``FOR SHARE NOWAIT``.

         .. seealso::

            :meth:`.Select.with_for_update` - improved API for
            specifying the ``FOR UPDATE`` clause.

        :param group_by:
          a list of :class:`.ClauseElement` objects which will comprise the
          ``GROUP BY`` clause of the resulting select.  This parameter
          is typically specified more naturally using the
          :meth:`.Select.group_by` method on an existing :class:`.Select`.

          .. seealso::

            :meth:`.Select.group_by`

        :param having:
          a :class:`.ClauseElement` that will comprise the ``HAVING`` clause
          of the resulting select when ``GROUP BY`` is used.  This parameter
          is typically specified more naturally using the
          :meth:`.Select.having` method on an existing :class:`.Select`.

          .. seealso::

            :meth:`.Select.having`

        :param limit=None:
          a numerical value which usually renders as a ``LIMIT``
          expression in the resulting select.  Backends that don't
          support ``LIMIT`` will attempt to provide similar
          functionality.    This parameter is typically specified more naturally
          using the :meth:`.Select.limit` method on an existing
          :class:`.Select`.

          .. seealso::

            :meth:`.Select.limit`

        :param offset=None:
          a numeric value which usually renders as an ``OFFSET``
          expression in the resulting select.  Backends that don't
          support ``OFFSET`` will attempt to provide similar
          functionality.  This parameter is typically specified more naturally
          using the :meth:`.Select.offset` method on an existing
          :class:`.Select`.

          .. seealso::

            :meth:`.Select.offset`

        :param order_by:
          a scalar or list of :class:`.ClauseElement` objects which will
          comprise the ``ORDER BY`` clause of the resulting select.
          This parameter is typically specified more naturally using the
          :meth:`.Select.order_by` method on an existing :class:`.Select`.

          .. seealso::

            :meth:`.Select.order_by`

        :param use_labels=False:
          when ``True``, the statement will be generated using labels
          for each column in the columns clause, which qualify each
          column with its parent table's (or aliases) name so that name
          conflicts between columns in different tables don't occur.
          The format of the label is <tablename>_<column>.  The "c"
          collection of the resulting :class:`.Select` object will use these
          names as well for targeting column members.

          This parameter can also be specified on an existing
          :class:`.Select` object using the :meth:`.Select.apply_labels`
          method.

          .. seealso::

            :meth:`.Select.apply_labels`

        """
        self._auto_correlate = correlate
        if distinct is not False:
            if distinct is True:
                self._distinct = True
            else:
                self._distinct = [
                    _literal_as_text(e)
                    for e in util.to_list(distinct)
                ]

        if from_obj is not None:
            self._from_obj = util.OrderedSet(
                _interpret_as_from(f)
                for f in util.to_list(from_obj))
        else:
            self._from_obj = util.OrderedSet()

        try:
            cols_present = bool(columns)
        except __HOLE__:
            raise exc.ArgumentError("columns argument to select() must "
                                    "be a Python list or other iterable")

        if cols_present:
            self._raw_columns = []
            for c in columns:
                c = _interpret_as_column_or_from(c)
                if isinstance(c, ScalarSelect):
                    c = c.self_group(against=operators.comma_op)
                self._raw_columns.append(c)
        else:
            self._raw_columns = []

        if whereclause is not None:
            self._whereclause = _literal_as_text(
                whereclause).self_group(against=operators._asbool)
        else:
            self._whereclause = None

        if having is not None:
            self._having = _literal_as_text(
                having).self_group(against=operators._asbool)
        else:
            self._having = None

        if prefixes:
            self._setup_prefixes(prefixes)

        GenerativeSelect.__init__(self, **kwargs)
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/sql/selectable.py/Select.__init__