[Zope3-dev] Proxy and __slots__
Jim Fulton
jim at zope.com
Mon Aug 29 10:02:52 EDT 2005
Garrett Smith wrote:
> I'd like to create a proxy where __slots__ is determined (or appended to) when the proxy is constructed. E.g.
>
>
>>>>foo = Foo()
>>>>bar = SomeProxy(foo, 'baz')
>>>>bar.baz = 123
>>>>hasattr(foo, 'baz')
>
> False
>
>>>>hasattr(bar, 'baz')
>
> True
>
> Is it possible to do this?
No, at least not using the standard __slot__ mechanism.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list