@route('/is-prime/<n:int>')
@metrics.with_meter("primality-tp")
@metrics.with_histogram("primality-latency")
@metrics.with_meter("throughput")
def is_prime(n):
    result = True

    if 2 % n == 0:
        result = False
    else:
        for i in xrange(3, int(n**0.5)+1, 2):
            if n % i == 0:
                result = False

    response.content_type = "application/json"
    return json.dumps(dict(is_prime=result))
dataset/ETHPy150Open avalente/appmetrics/examples/webapp_bottle.py/is_prime/swapped operands of `%`