Python: How to unshadow the keyword 'property'?
<p>I am supporting a <strong>legacy</strong> python application which has a class written as such (still running in python 2.4):</p>

<pre><code>class MyClass(object):

    def property(self, property_code, default):
        ...
</code></pre>

<p>Now I am adding some new code to it:</p>

<pre><code>    def _check_ok(self):
        ...

    ok = property(lamdba self:self._check_ok())
</code></pre>

<p>Basically I want to add a property <strong>'ok'</strong> to this class.</p>

<p>However it does not work. I encountered this error message:</p>

<pre><code>TypeError: property() takes at least 2 arguments (1 given)
</code></pre>

<p>The existing class method 'property' has overshadowed the built-in 'property' keyword. </p>

<p>Is there any way I can use <strong>'property'</strong> the way it meant to be in my new code? </p>

<p>Refactor the existing <code>property()</code> function is not an option.</p>

<p><strong>EDIT:</strong> If I put the new code before the <code>MyClass::property</code> def, it will work. But I really want to see if there is a better solution</p>

<p><strong>EDIT 2:</strong> These codes work in shell</p>

<pre><code>&gt;&gt;&gt; class Jack(object):
...   def property(self, a, b, c):
...      return 2
...   p = __builtins__.property(lambda self: 1)
...
&gt;&gt;&gt; a = Jack()
&gt;&gt;&gt; a.p
1
&gt;&gt;&gt; a.property(1, 2, 3)
2
</code></pre>

<p>But the same technique does not work in my app. Got <strong>AttributeError: 'dict' object has no attribute 'property'</strong> error</p>
