why my code run wrong ,it is about '@property'
<p>i used python 2.5,i want to know how can change the next code when the Platform is python2.5 or python2.6</p>

<pre><code>class C(object):
    def __init__(self):
        self._x = None

    @property
    def x(self):
        """I'm the 'x' property."""
        return self._x

    @x.setter
    def x(self, value):
        self._x = value

    @x.deleter
    def x(self):
        del self._x

a=C()
print a.x#error
</code></pre>

<p>thanks</p>

<p><hr /></p>

<p>thanks ,alex,i think property must be 3 arguments in your example</p>

<p>but ,i have seen a code which with 'property' only use 1 argumennt ,why,can it work</p>

<pre><code>class SortingMiddleware(object):
    def process_request(self, request):
        request.__class__.field = property(get_field)
        request.__class__.direction = property(get_direction)
</code></pre>
