def get_paginator_class():
    try:
        from pure_pagination import Paginator
        pure_pagination = True
    except __HOLE__:
        # the simplest emulation of django-pure-pagination behavior
        from django.core.paginator import Paginator, Page
        class PageRepr(int):
            def querystring(self):
                return 'page=%s' % self
        Page.pages = lambda self: [PageRepr(i) for i in range(1, self.paginator.num_pages + 1)]
        pure_pagination = False

    return Paginator, pure_pagination
dataset/ETHPy150Open hovel/pybbm/pybb/compat.py/get_paginator_class