56: Fixed Proxy.__call__

This commit is contained in:
Jason Gerard DeRose 2008-08-06 03:51:33 +00:00
parent 277685439c
commit 8865f516df

View File

@ -132,6 +132,7 @@ class Proxy(ReadOnly):
"""
__slots__ = (
'__call__',
'__obj',
'name',
)
@ -145,6 +146,8 @@ class Proxy(ReadOnly):
assert isinstance(proxy_name, str)
object.__setattr__(self, '_Proxy__obj', obj)
object.__setattr__(self, 'name', proxy_name)
if callable(obj):
object.__setattr__(self, '__call__', obj.__call__)
#for name in self.__slots__:
# object.__setattr__(self, name, getattr(obj, name))