Eric Snow added the comment:

FYI, I'll re-iterate something I said before, there is a different approach you 
can take here if this is just an issue of proxying.  Use two different proxy 
types depending on if the proxied object is callable or not:


class Proxy:
    # all the proxy stuff...


class CallableProxy(Proxy):
    def __call__(self, *args, **kwargs):
        ...


def proxy(obj):
    if callable(obj):
        return CallableProxy(obj)
    else:
        return Proxy(obj)


If that isn't a viable alternative then please explain your use case in more 
detail.  I'm sure we can find a solution that works for you.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to