Assign attributes when another is changed
<p>I have a Python Shape class with an attribute called datum. It is a list with two numbers, x and y.</p>

<p>If I do </p>

<pre><code>my_shape = Shape()
</code></pre>

<p>Then the datum is given default value: [0,0]
Now, I want to reassign the datum by doing:</p>

<pre><code>my_shape.datum = [3,2] 
</code></pre>

<p>then my datum is now assigned that list.</p>

<p>But I also have attributes x and y. How do I make x and y automatically update to become the first and second item of the datum list?</p>

<p>I put this in the <strong>init</strong></p>

<pre><code>self.x = self.datum[0]
self.y = self.datum[1]
</code></pre>

<p>But that only assigns x and y to the initialized values and I can't figure out how to update when self.datum updates.</p>

<p>I'm sorry if this is confusing. Thank you so much for helping this newbie.</p>

<p>-Jason</p>
