What *instance* called me & proxy methods

Emile van Sebille emile at fenx.com
Wed Mar 28 17:42:46 EST 2001


"Carlos Alberto Reis Ribeiro" <cribeiro at mail.inet.com.br> wrote in message
news:mailman.985798623.5866.python-list at python.org...
<snip>

> and it has some undesirable side effects because it is not completely
> transparent, and it needs some intermediate processing. The only way that
I
> found to signal to the proxied object about the existence of the proxy was
> to create a temporary "proxy" attribute (see point (3) above). However, it
> serves it purpose as a proof-of-concept:
>

It seems to me that what you're trying to do is discover the container of an
instance.  Whether the instance is wrapped in a class or held in a list,
when the instance's methods are invoked, self is self and not the container.
If you take a look at pep 232
http://python.sourceforge.net/peps/pep-0232.html you may find that, if
instance method attribute setting were allowed, this could be what you're
looking for.

Perhaps you can take this PEP to the next step if it's what you're after

Regards,

--

Emile van Sebille
emile at fenx.com

---------





More information about the Python-list mailing list