On Sat, Feb 4, 2012 at 5:20 PM, Nick Coghlan
Rather than throwing out random ideas in a popularity contest, it's important to carefully review what it is that people don't like about the current state of affairs.
[snipped]
It would be a *lot* cleaner if we could just use a normal assignment statement instead of builtin functions to perform the name binding. As it turns out, for ordinary instances, we can already do exactly that:
for attr in "attr1 attr2 attr3".split(): vars(x)[attr] = vars(y)[attr]
In short, I think proposals for dedicated syntax for dynamic attribute access are misguided - instead, such efforts should go into enhancing vars() to return objects that support *full* dict-style access to the underlying object's attribute namespace (with descriptor protocol support and all).
Good call on this, Nick. :) -eric