If memory serves me right, Erik Bågfors wrote:
> > :-) Python basically requires that each step in the process be
> > overridable. (1. look up attribute 2. call attribute, at least in
> > `callmethod's case).

would this be more of what you need ? 

obj.__dict__["foo"].__call__();

/me again shows up and says that the compiler designer can do this with
ease ... Or in this case the interpreter designer can implement an
``InvocationExpression'' in anyway they want ... 

I think Jython would be a fine example of how this could be done (though
speed suffers on a hash lookup without engine support ?).

> Ruby needs to call the missing_method method (if I remember correctly). 
> So if "foo" doesn't exist, it would be good to be able to override
> callmethods behavior and make it call missing_method.

like I said , the compiler designer can put that explicitly in the 
generated code ... You don't actually need instructions to do that.
Also the explicit generation might prove to be better to handle all
the quirks future languages might encounter....

My interest here is to obtain a clear and fast way to call stuff for
static compiled languages. :) 

Gopal
-- 
The difference between insanity and genius is measured by success

Reply via email to