title: How does the Python setter decorator work
body: <p>I am just starting Python, so bear with me if I am missing something obvious. I have read about the decorators and how they work, and I am trying to understand how this gets translated:</p>
  
  <pre><code>class SomeObject(object):
  
      @property
      def test(self):
          return "some value"
  
      @test.setter   
      def test(self, value):
          print(value)
  </code></pre>
  
  <p>From what I have read, this should be turned into:</p>
  
  <pre><code>class SomeObject(object):
  
      def test(self):
          return "some value"
  
      test = property(test)
  
      def test(self, value):
          print(value)
  
      test = test.setter(test)
  </code></pre>
  
  <p>However when I try this, I get</p>
  
  <pre><code>AttributeError: 'function' object has no attribute 'setter'
  </code></pre>
  
  <p>Can someone explain how the translation works in that case?</p>