@register.tag
def nickname(_parser, token):
  try:
    _, email_address, never_me = token.split_contents()
  except ValueError:
    try:
      _, email_address = token.split_contents()
      never_me = ''
    except ValueError:
      raise django.template.TemplateSyntaxError(
        "%r requires exactly one or two arguments" % token.contents.split()[0])
  return NicknameNode(email_address, never_me)
Almost the same as nickname filter but the result is cached.
dataset/ETHPy150Open rietveld-codereview/rietveld/codereview/library.py/nickname