Python Parenting

I need to copy the rotation and location of object A to object B in a python script. Object A would be parented to a dynamic object C.
Any help?

code runs on object B


import GameLogic as g
o = g.getCurrentController().getOwner()
o.setPosition(g.getCurrentScene().getObjectList()["OBA"].getPosition())
o.setOrientation(g.getCurrentScene().getObjectList()["OBA"].getOrientation())

Thank you!
This will no doubt work very nicely!