@_generative(_no_statement_condition)
def slice(self, start, stop):
    'apply LIMIT/OFFSET to the ``Query`` based on a "\n        "range and return the newly resulting ``Query``.'
    if ((start is not None) and (stop is not None)):
        self._offset = ((self._offset or 0) + start)
        self._limit = (stop - start)
    elif ((start is None) and (stop is not None)):
        self._limit = stop
    elif ((start is not None) and (stop is None)):
        self._offset = ((self._offset or 0) + start)
    if (self._offset == 0):
        self._offset = None
apply LIMIT/OFFSET to the ``Query`` based on a "
"range and return the newly resulting ``Query``.
@_generative(_no_statement_condition)
def slice(self, start, stop):
    'apply LIMIT/OFFSET to the ``Query`` based on a "\n        "range and return the newly resulting ``Query``.'
    if ((start is not None) and (stop is not None)):
        self._offset = ((self._offset or 0) + start)
        self._limit = (stop - start)
    elif ((start is None) and (stop is not None)):
        self._limit = stop
    elif ((start is not None) and (stop is None)):
        self._offset = ((self._offset or 0) + start)
    if (self._offset == 0):
        self._offset = None