def page(self, number):
        """
        Returns a Page object for the given 1-based page number.
        """
        number = self.validate_number(number)
        bottom = (number - 1) * self.per_page
        top = bottom + self.per_page

        marker_value, pages = _get_marker(
            self.queryset_id,
            number
        )

        if marker_value:
            if len(self.original_orderings) == 1 and self.original_orderings[0].startswith("-"):
                qs = self.object_list.all().filter(**{"{}__lt".format(self.field_required): marker_value})
            else:
                qs = self.object_list.all().filter(**{"{}__gt".format(self.field_required): marker_value})
            bottom = pages * self.per_page # We have to skip the pages here
            top = bottom + self.per_page
        else:
            qs = self.object_list

        results = list(qs[bottom:top + (self.per_page * self.readahead)])

        next_page = results[top:]
        next_page_counter = number + 1
        while next_page:
            if len(next_page) > self.per_page-1:
                index = self.per_page-1
            else:
                index = len(next_page)-1
            _store_marker(
                self.queryset_id,
                next_page_counter,
                getattr(next_page[index], self.field_required)
            )
            next_page_counter += 1
            next_page = next_page[self.per_page:]

        if not results and not self.allow_empty_first_page:
            raise paginator.EmptyPage("That page contains no results")

        known_count = ((number - 1) * self.per_page) + len(results)
        _update_known_count(self.queryset_id, known_count)

        page = self._get_page(results[:self.per_page], number, self)

        if len(page.object_list) > self.per_page-1:
            index = self.per_page-1
        else:
            index = 1-len(page.object_list)

        if results:
            _store_marker(
                self.queryset_id,
                number,
                getattr(page.object_list[index], self.field_required)
            )

        return page
dataset/ETHPy150Open potatolondon/djangae/djangae/contrib/pagination/paginator.py/Paginator.page/swapped operands of `-`