def prepared_paginate(items, num_items, max_per_page):
    if max_per_page == 0:
        num_pages = 1
    else:
        num_pages = int(ceil(float(num_items) / max_per_page))
    return items, num_items, num_pages
dataset/ETHPy150Open edgewall/trac/trac/util/presentation.py/prepared_paginate/original