On 25 August 2010 20:57, P.J. Eby <p...@telecommunity.com> wrote:

> [snip...]
> As you can see, the __call__ attribute in each case is whatever the proxied
> object's __call__ attribute is, even though the proxy itself has a __call__
> method, that is invoked when the proxy is called.
>
> This is actually pretty straightforward stuff since the introduction of
> __getattribute__.
>
> (The code is at http://pypi.python.org/pypi/ProxyTypes, btw.)
>

For what it's worth this code is useful enough (and simple enough) that I
would support its inclusion in the standard library. I've written proxy
objects several times (for various different purposes) and this would have
saved me the effort. :-)

All the best,

Michael Foord


-- 
http://www.voidspace.org.uk
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to