hi: i have a decorator given below. def checkdb(web): def decorator(func): def proxyfunc(self, args=(), kw=None): #DO STUFF with web return func(self, *args, **kw) return proxyfunc return decorator
but if i use it to decorate function without any arguments I get this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: proxyfunc() takes at least 1 argument (0 given) how to fix this? thanks
-- http://mail.python.org/mailman/listinfo/python-list