Commit eee5e9d3 authored by akhuziy's avatar akhuziy
Browse files

minor fix

parent 879ad80b
......@@ -25,15 +25,15 @@ def accepts(*types, **kw):
try:
def decorator(f):
def newf(*args):
if debug is 0:
if debug == 0:
return f(*args)
assert len(args) == len(types)
argtypes = tuple(map(type, args))
if argtypes != types:
msg = info(f.__name__, types, argtypes, 0)
if debug is 1:
if debug == 1:
print >> sys.stderr, 'TypeWarning: ', msg
elif debug is 2:
elif debug == 2:
raise TypeError(msg)
return f(*args)
newf.__name__ = f.__name__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment