property not working as intended
<p>I'm trying to follow a tutorial on <a href="http://www.programiz.com/python-programming/property" rel="nofollow">http://www.programiz.com/python-programming/property</a>, and have written the following script:</p>

<pre><code>class Celsius:
    def __init__(self, temperature = 0):
        self.temperature = temperature

    def get_temperature(self):
        print("Getting value")
        return self._temperature

    def set_temperature(self, value):
        if value &lt; -273:
            raise ValueError("Temperature below -273 is not possible")
        print("Setting value")
        self._temperature = value

    temperature = property(get_temperature, set_temperature)


c = Celsius()

print c.temperature
c.temperature = 100
print c.temperature
</code></pre>

<p>When I run the script, I simply see the two temperature values:</p>

<pre><code>0
100
</code></pre>

<p>However, I would expect the <code>Getting value</code> and <code>Setting value</code> print statements to be visible as well. Is the <code>property</code> somehow not working properly?</p>

<p>you need define class as this:</p>

<pre><code>class Celsius(object):
    balabala
    balabala
</code></pre>

python