Dear all, I have a Fortran programming background and I have some difficulties in understading how function wrappers work. I have delved into the subject because of the new decorators, but I understand the decorator syntax. My ignorance is more profound... Here is an example without decorators:
def require_int(func): def wrapper(arg): assert isinstance(arg, int) return func(arg) return wrapper p1(a): print a p2=require_int(p1) My question is: why do p2 arguments become wrapper arguments? What is the flux of the arguments in the program when you pass functions as arguments? I have looked into some books and google but I cannot find a satisfactory explanation. Could somebody please give me a hint or point me to an appropriate source? Thanks for your time, Ramon -- http://mail.python.org/mailman/listinfo/python-list