'Returns a SimplePage object for the given 1-based page number.'

def page(self, number):

    number = self.validate_number(number)
    bottom = ((number - 1) * self.per_page)
    top_plus_one = ((bottom + self.per_page) + 1)
    page_items = self.object_list[bottom:top_plus_one]
    if (not page_items):
        if ((number == 1) and self.allow_empty_first_page):
            pass
        else:
            raise EmptyPage('That    page    contains    no    results')
    has_next = (len(page_items) > self.per_page)
    if has_next:
        page_items = list(page_items)[:(-1)]
    return SimplePage(page_items, number, self, has_next)
