title: Is there a python function to rename an object's attribute?
body: <p>Basically, is there already a built-in or commonly available function that does this:</p>
  
  <pre><code>def rename_attribute(object_, old_attribute_name, new_attribute_name):
      setattr(object_, new_attribute_name, getattr(object_, old_attribute_name))
      delattr(object_, old_attribute_name)
  </code></pre>