

def remove(self, obj):
    'Removes a child given its name or object\n\n        If the node was added with name, it is better to remove by name, else\n        the name will be unavailable for further adds (and will raise an \n        Exception if add with this same name is attempted)\n\n        If the node was part of the active scene, its :meth:`on_exit` method \n        will be called.\n\n        Arguments:\n            obj (str or object):\n                Name of the reference to be removed or object to be removed.\n        '
    if isinstance(obj, string_types):
        if (obj in self.children_names):
            child = self.children_names.pop(obj)
            self._remove(child)
        else:
            raise Exception(('Child not found: %s' % obj))
    else:
        self._remove(child)

dataset/ETHPy150Open los-cocos/cocos/cocos/cocosnode.py CocosNode.remove/VarMisuse@78/289 `obj`->`child`