python and a facade
<p>I want to have a python class that just acts as a wrapper for another python class.</p>

<p>Something like this</p>

<pre><code>class xxx:
    name = property( fset=lambda self, v: setattr(self.inner, 'name', v), fget=lambda self: getattr(self.inner, 'name' ))

    def setWrapper( self, obj )
       self.inner = obj
</code></pre>

<p>So when someone says xxx().x = 'hello' I want it to set the value on xxx().inner.whatever and not xxx().x.</p>

<p>Is this possible, I have been trying lambdas, but to no avail.   </p>

<p><strong>Edit:</strong>
Now my wife isn't rushing me to bed so I can flush out the code a bit more.  I kind of had an idea about what you guys had below, but from the <a href="http://www.python.org/download/releases/2.2.3/descrintro/#property" rel="nofollow">docs</a> it seemed that you should avoid overriding <code>__setattr__/__getattr__</code> and use property instead.  If it is not possible to do this via the property function then I will use the <code>__setattr__/__getattr__</code>?  Thanks</p>
