#!/usr/bin/env python
from accepts import accepts


@accepts(int)
def inc(arg):
    return arg + 1

try:
    inc(42)  # ok
    inc("string")  # TypeError
except TypeError as e:
    print("%s: %s" % (type(e), str(e)))
