I'm quite new to Maya and it api. I'm currently exploring api 2.0 and haven't figured out how to delete a node through the API. Assuming I have a MDagPath object in a list, how do I go about deleting it from the scene?

I looked into MDagModifier, but passing the MDagPath to its deleteNode method raises:

# Error: TypeError: MObject expected #
I never would have thought it would be this complicated to delete a scene node... do I need to disconnect any and all connections first? I thought this convenience method would take care of this...

Do I need to cast it or get its MObject form?

Any insight would be appreciated.