(msg, q=None)
return q
Returns the query in the second argument (or a :class:`NullQuery` if the
    second argument is not given) with its ``error`` attribute set to
    ``msg``.
Returns the query in the second argument (or a :class:`NullQuery` if the
    second argument is not given) with its ``error`` attribute set to
    ``msg``.
Returns the query in the second argument ( or a : class : NullQuery if the second argument is not given ) with its error attribute set to msg .
def error_query(msg, q=None):
    """Returns the query in the second argument (or a :class:`NullQuery` if the
    second argument is not given) with its ``error`` attribute set to
    ``msg``.
    """

    if q is None:
        q = _NullQuery()
    q.error = msg
    return q
def error_query ( msg , q = None ) : if q is None : q = _NullQuery ( ) q . error = msg return q