Python: defining total sum of certain object attributes within Class?
<p>Simplified sample code:</p>

<pre><code>    class Numbers(object):

    def __init__(self, value):
    self.value = value


instance1 = Numbers(100)
instance2 = Numbers(120)
instance3 = Numbers(76)
</code></pre>

<p>I would like to set a variable within the class (or otherwise) that would be set to the total sum of all the values (100 + 120 + 76 in this case). Is it possible to do with a class variable?</p>