Message241651
| Author |
eric.snow |
| Recipients |
Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, rhettinger, steven.daprano, terry.reedy |
| Date |
2015年04月20日.14:08:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1429538905.44.0.864865200854.issue23990@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年04月20日 14:08:25 | eric.snow | set | recipients:
+ eric.snow, rhettinger, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, r.david.murray, Claudiu.Popa, ethan.furman, llllllllll, jedwards |
| 2015年04月20日 14:08:25 | eric.snow | set | messageid: <1429538905.44.0.864865200854.issue23990@psf.upfronthosting.co.za> |
| 2015年04月20日 14:08:25 | eric.snow | link | issue23990 messages |
| 2015年04月20日 14:08:25 | eric.snow | create |
|