>>> import albatross
>>> ctx = albatross.SimpleContext('.')
>>> ctx.locals.seq = range(9)
>>> t = albatross.Template(ctx, '<magic>', '''
... pagesize has_prevpage has_nextpage index start count value
... ----------------------------------------------------------
... <al-for iter="i" expr="seq" pagesize="3">
... <al-value expr="'%8s' % i.pagesize()">
... <al-value expr="'%13s' % i.has_prevpage()">
... <al-value expr="'%13s' % i.has_nextpage()">
... <al-value expr="'%6s' % i.index()">
... <al-value expr="'%6s' % i.start()">
... <al-value expr="'%6s' % i.count()">
... <al-value expr="'%6s' % i.value()" whitespace>
... </al-for>''')
>>> t.to_html(ctx)
>>> ctx.locals.i.set_backdoor('nextpage', 'nextpage,i')
>>> t.to_html(ctx)
>>> ctx.locals.i.set_backdoor('nextpage', 'nextpage,i')
>>> t.to_html(ctx)
>>> ctx.flush_content()
pagesize has_prevpage has_nextpage index start count value
----------------------------------------------------------
       3        False         True     0     0     0     0
       3        False         True     1     0     1     1
       3        False         True     2     0     2     2
pagesize has_prevpage has_nextpage index start count value
----------------------------------------------------------
       3         True         True     3     3     0     3
       3         True         True     4     3     1     4
       3         True         True     5     3     2     5
pagesize has_prevpage has_nextpage index start count value
----------------------------------------------------------
       3         True        False     6     6     0     6
       3         True        False     7     6     1     7
       3         True        False     8     6     2     8
