def do_get_applicable_positions(parser, token):
    """
    {% get_applicable_positions object as positions [all] %}
    
    or for the admin..
    
    {% get_applicable_positions content_type_id object_id as positions [all] %}
    
    all is optional and will return all, if it is not speficied only positions
    that the current object is not contained in will be returned
    """
    argv = token.contents.split()
    argc = len(argv)

    if argc > 6:
        raise TemplateSyntaxError, argv[0] % "Tag %s takes three, four or five arguments."

    return_all = False
    if argv[2] == "as":
        if argc == 5 and argv[4] == 'all':
            return_all = True
        return ApplicablePositionsNode(obj=argv[1], varname=argv[3], 
            return_all=return_all)
    elif argv[3] == "as":
        if argc == 6 and argv[5] == 'all':
            return_all = True
        return ApplicablePositionsNode(content_type_id=argv[1], 
            object_id=argv[2], varname=argv[4], return_all=return_all)
    else:
        raise TemplateSyntaxError, 'Second or Third argument must be "as"'
dataset/ETHPy150Open callowayproject/django-kamasutra/positions/templatetags/position_tags.py/do_get_applicable_positions/swapped operands of `%`