title: python - why is read-only property writable?
body: <p>I am trying to define a class with a read-only property in a Python; I followed Python documentation and came up with the following code:</p>
  
  <pre><code>#!/usr/bin/python
  
  class Test:
          def __init__(self, init_str):
                  self._prop = init_str
  
          @property
          def prop(self):
                  return self._prop
  
  t = Test("Init")
  print t.prop
  t.prop = "Re-Init"
  print t.prop
  </code></pre>
  
  <p>Now when I try to execute the code though I am expecting error/exception I see it getting executed normally:</p>
  
  <pre><code>$ ./python_prop_test 
  Init
  Re-Init
  </code></pre>
  
  <p>My Python version is 2.7.2. What I am seeing, is it expected? How do make sure a property is not settable?</p>