George Sakkis wrote: > On Jun 21, 4:42 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> On Jun 21, 8:51 pm, George Sakkis <[EMAIL PROTECTED]> wrote: >> >>> I wonder if there is a (preferably not too-hackish) solution to the >>> following introspection problem: given a callable and a number of >>> positional and/or keyword arguments, infer what would be the frame's >>> locals() right after the function is called.... > > Turns out it wasn't that hard after all; I came up with the following: > ....
So, what should your code do about this: def someFunction(a, b, c=43, d=14, f=12): print locals() import functools a_funct = functools.partial(someFunction, d=13, c=5) b_funct = functools.partial(a_funct, 14, d=12) localsProber(b_funct) My point is simply: Introspection code is often written with a fixed idea of what other programmers write. The others don't use introspection, the others don't use higher order functions to build functions, .... --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list