Pythonic syntax for appending an arbitrary class object list property
<p>Is there an analog of <code>setattr()</code> that allows for appending an arbitrary list property of an instantiated class object? If not, is there a recommended way of doing so?</p>

<p>This is a trivialized version of what I'm doing currently:</p>

<pre><code>foo = SomeClass()
...
attr = "names"
value = "Eric"
values = getattr(foo, attr)
values.append(value)
setattr(foo, attr, values)
</code></pre>

<p>This seems clunky and inefficient.</p>

<p>Edit: this assumes that foo.names (or whatever arbitrary value might be assigned to the attr variable) is in fact a list.</p>
