title: Python decorating property setter with list
body: <pre><code>globalList = []
  class MyList:
      def __init__(self):
          self._myList = [1, 2, 3]
  
      @property
      def myList(self):
          return self._myList + globalList
      @myList.setter
      def myList(self, val):
          self._myList = val
  
  mL1 = MyList()
  print("myList: ", mL1.myList)
  mL1.myList.append(4)
  print("after appending a 4, myList: ", mL1.myList)
  mL1.myList.extend([5,6,"eight","IX"])
  print("after extend, myList: ", mL1.myList)
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>myList:  [1, 2, 3]
  after appending a 4, myList:  [1, 2, 3]
  after extend, myList:  [1, 2, 3]
  </code></pre>
  
  <p>The problem I am facing is that mL1.myList.append(4) and mL1.myList.extend([5,6,"eight","IX"]) do not modify the _myList attribute in the mL1 object. How could I do to resolve the problem?</p>