conceiling function calls..

Carlo v. Dango oest at soetu.eu
Thu Nov 13 19:50:13 EST 2003


Thanks for your reply... Unfortunately, I cannot truly see your 
suggestions before my eyes..

>> It is possible to conceil access to methods using the "property()"
>> function so method access looks like field access.. is the same possible
>> for functions (not taking any args... )
>
> It's possible as long as the functions are accessed as attributes of
> some object -- it may be horrible, but you CAN, if you wish, write a
> __getattribute__ for the "some object" to force any access to the
> attribute to become a CALL to that attribute.

but then I'm forced to use the self pointer.. I want to conceil it.



> You could, of course, wrap the function into an object (of the
> same name if you wish) that calls it whenever "an attribute of that
> name" is accessed (SHUDDER).

hmm Im not sure what you are suggesting here. Are you still making use of 
the self reference? or how would you construct this...

please note that it's my purpose to hide the user from whats really going 
on..

-carlo..



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/




More information about the Python-list mailing list