>>> import albatross >>> ctx = albatross.SimpleContext('.') >>> ctx.locals.key = 2 >>> albatross.Template(ctx, '', ... ''' ... item expr="1" key is ... item expr="key" key is ... ''').to_html(ctx) >>> ctx.locals.key = 1 >>> t = albatross.Template(ctx, '', ''' ... ... ''') >>> t.to_html(ctx) >>> ctx.flush_content() item expr="1" key is 1 >>> ctx.locals.key = 2 >>> t.to_html(ctx) >>> ctx.flush_content() item expr="key" key is 2