title: Python attribute that is read only within class
body: <p>I have a class:</p>
  
  <pre><code>class Portfolio:
      def __init__(self, value):
          self.value = value
  
  class GenericStrategy:
      def __init__(self, portfolio: Portfolio):
          self.portfolio = portfolio
  
      def modify_ptf_value(new_value):
          self.portfolio.value = new_value
          # This should return an error
  </code></pre>
  
  <p>I'will write some strategies which will inherit from <code>GenericStrategy</code>. I'd like their methods to be able to read the attribute portfolio but not to modify it, nor its attributes.</p>
  
  <p>I read something about the <code>@properties</code> decorator, but it only works if I don't want the attribute (and its attributes) to be accessible from the outside, i can still modify the attribute (and its attributes) from methods 'inside' the object.
  Is there a way to make the attribute (and its attributes) 'read-only' except for the <code>__init__</code> method? Is my design wrong and should start over? I know it is up to the user not to modify "protected" attributes, but I would like to make it bullet proof. Any idea is well accepted, even if it requires a substantial change in the class design.</p>
  
  <p>Thanks</p>