@environmentfilter
def do_last(environment, seq):
    try:
        return iter(reversed(seq)).next()
    except StopIteration:
        return environment.undefined('No last item, sequence was empty.')
Return the last item of a sequence.
dataset/ETHPy150Open IanLewis/kay/kay/lib/jinja2/filters.py/do_last