def del_object_from_parent ( self ) : if self . parent : self . parent . objects . pop ( self . ref )
python delete an object if it exists
Delete object from parent object .
def del_object_from_parent(self):
        """ Delete object from parent object. """
        if self.parent:
            self.parent.objects.pop(self.ref)