Hi, > > def check_login(func): > > def _check_login(*args): > > print "I am decorator" > > return func(*args) > > return _check_login > > > @check_login > > def method2(input): > > print "I am method TWO. Input %s" % input > > That looks okay. What is unclear? >
It just look complicated than using a simple function like this def check_login(msg): #... def my_func(toto, tata): #... #call it like this check_login('msg') my_func('toto', 'tata') I hope I could be able to understand clearly the decorators and use it to it efficiently Thanks james -- http://mail.python.org/mailman/listinfo/python-list