import pymel.core as pm
t,h = pm.polySphere()
pm.SCENE.initialShadingGroup.remove(t)
# ,Error:, in method 'MFnSet_removeMember', argument 2 of type 'MPlug const &'
# Traceback (most recent call last):
# File "<maya console>", line 3, in <module>
# File "/v/work/main/build/debug/runTime/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel/core/nodetypes.py", line 5680, in remove
# return self.__apimfn__().removeMember(item.__apiobject__())
# TypeError: in method 'MFnSet_removeMember', argument 2 of type 'MPlug const &' #
# but this works
pm.sets(pm.SCENE.initialShadingGroup,e=True,remove=t)
Is this the right place for this?