Terry Reedy wrote:
> Now wrap *every* function you are interested in. Builtin functions are
> no problem; methods of builtin classes cannont be wrapped without
> subclassing.
It's a shame it's not possible to do:
type.__call__ = func_wrap(type.__call__)
Or even:
type.__class__ = NewTyp
On Wed, Feb 17, 2010 at 11:04 AM, Dan Yamins wrote:
> Really, nobody has any idea about this? (Sorry to repost.)
>
> On Tue, Feb 16, 2010 at 7:29 PM, Dan Yamins wrote:
>>
>> Hi:
>>
>> I'm wondering what the best way to wrap and modify function calls is.
>> Essentially what I want to achieve is
> For CPython, alternative 1 is to create a custom interpreter to change
> (wrap) the interpretation of the call-function bytecode in the ceval loop.
> That is its 'call event', and I believe this would catch every explicit
> f(args) call and only such calls.
>
>
> Python has no general metasynta
On 2/17/2010 11:04 AM, Dan Yamins wrote:
Really, nobody has any idea about this? (Sorry to repost.)
On Tue, Feb 16, 2010 at 7:29 PM, Dan Yamins mailto:dyam...@gmail.com>> wrote:
Hi:
I'm wondering what the best way to wrap and modify function calls
is.Essentially what I want
Really, nobody has any idea about this? (Sorry to repost.)
On Tue, Feb 16, 2010 at 7:29 PM, Dan Yamins wrote:
> Hi:
>
> I'm wondering what the best way to wrap and modify function calls is.
> Essentially what I want to achieve is to have a function like this:
>
> def Wrap(frame,event,arg):
>
Hi:
I'm wondering what the best way to wrap and modify function calls is.
Essentially what I want to achieve is to have a function like this:
def Wrap(frame,event,arg):
if event == 'call':
result = PerformCheck(GetArgumentsFromFrame(frame))
if Condition(result):
r