

def page(self, number):
    '\n        Returns a Page object for the given 1-based page number.\n        '
    number = self.validate_number(number)
    bottom = ((number - 1) * self.per_page)
    top = (bottom + self.per_page)
    page_items = self.object_list[bottom:top]
    if (not page_items):
        if ((number == 1) and self.allow_empty_first_page):
            pass
        else:
            raise EmptyPage('That page contains no results')
    return InfinitePage(page_items, number, self)

dataset/ETHPy150Open amarandon/smeuhsocial/apps/pagination/paginator.py InfinitePaginator.page/original