On 25 August 2010 20:57, P.J. Eby <pje at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100901/95182dfb/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4