def do_get_position(parser, token):
    """
    {% get_position name as varname %}
    {% get_position prefix name as varname [slugify=True|False] %}
    """    
    argv = token.contents.split()
    argc = len(argv)

    if argc < 4:
        raise TemplateSyntaxError, argv[0] % "Tag %s takes at least 3 argument."
        
    if argv[2] != 'as' and argv[3] != 'as':
        raise TemplateSyntaxError, "Tag %s must have 'as' as the second or third argument." % argv[0]
        
    name, prefix, varname, startpos = '', '', '', 0
    if argv[2] == 'as':
        name = argv[1]
        varname = argv[3]
        startpos = 4
    elif argv[3] == 'as':
        prefix = argv[1]
        name = argv[2]
        varname = argv[4]
        startpos = 5
    
    kwargs = {}
    for argument in argv[startpos:]:
        if len(argument.split('=')) == 2:
            kwargs[str(argument.split('=')[0])] = argument.split('=')[1]
    
    return PositionNode(prefix, name, varname, **kwargs)
dataset/ETHPy150Open callowayproject/django-kamasutra/positions/templatetags/position_tags.py/do_get_position/swapped operands of `%`