Re: Inferring initial locals()

2007-06-24 Thread Scott David Daniels
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

Re: Inferring initial locals()

2007-06-24 Thread George Sakkis
On Jun 24, 10:52 pm, Scott David Daniels [EMAIL PROTECTED] wrote: 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)

Inferring initial locals()

2007-06-21 Thread George Sakkis
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. For example, given: def f(x, y=1, *a, **k): z

Re: Inferring initial locals()

2007-06-21 Thread [EMAIL PROTECTED]
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

Re: Inferring initial locals()

2007-06-21 Thread George Sakkis
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