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