Also worth mentioning here is the strength of using the api for such operations. For instance, it's straight forward to grab all of the MObjects of the nodes you are working on, before renaming them. If you rename a number of nodes in the same hierarchy using a mel- centric approach you need to do some pretty ugly string manipulation to ensure that you don't maintain a reference to a node that was renamed by your action. If you grab the MObjects first, you don't have to worry about this possibility since renaming an MObjects won't change its address.
same goes for pymel objects -chad
-- http://groups.google.com/group/python_inside_maya
