Ramon Crehuet wrote: > def require_int(func): > def wrapper(arg): > assert isinstance(arg, int) > return func(arg) > return wrapper > def 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 suspect you don't understand that each time require_int is called a _new_ function named wrapper is created (and then returned).
-Scott David Daniels Scott David [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list