title: Why python property() function is assigned to a class variable and not an instance variable?
body: <p>I'm learning about encapsulation and abstraction in python and i came across the property function and decorator. The common example is something like this.</p>
  <pre><code>class Celsius():
      def __init__(self, temperature = 0):
          self.set_temperature(temperature)
  
      def to_fahrenheit(self):
          return (self._temperature * 1.8) + 32
  
      def get_temperature(self):
          print(&quot;Getting value&quot;)
          return self._temperature
  
      def set_temperature(self, value):
          if value &lt; -273:
              raise ValueError(&quot;Temperature below -273 is not possible&quot;)
          print(&quot;Setting value&quot;)
          self._temperature = value
  
      temperature = property(get_temperature,set_temperature)
  </code></pre>
  <p>I dont understand why the property function is assigning the descriptor to  <code>temperature</code> and not <code>self.temperature</code>. Isn't it suppouse to create a getter or setter functionality to a Instance, not to the class?</p>
  <p>something like</p>
  <pre><code>self.temperature = property(get_temperature,set_temperature)
  </code></pre>
  <p>using</p>
  <pre><code>test = Celsius()
  pprint(test.__dict__)
  </code></pre>
  <p>returns that the instance object just have the <code>self._temperature</code> attribute (Which we are trying to make private).
  using <code>pprint(Celsius.__dict__)</code> returns that is actually the class that have the temperature attribute that we are accessing when using the objects, which to my understanding doesn't make sense since i am interested in creating functionality to the instance and access the instance atributes, not the class attributes.</p>
  <p>Thanks in advance :)</p>