def remove_object(self, object=<NUM_LIT:0>, delete=True):
if type(object) in [int, int]: n = object<EOL>else:                           n = self.objects.index(object)<EOL>object = self.objects.pop(n)<EOL>if hasattr_safe(object, '<STR_LIT>'):<EOL><INDENT>self._layout.removeWidget(object._widget)<EOL>object._widget.hide()<EOL>if delete: object._widget.deleteLater()<EOL><DEDENT>else:<EOL><INDENT>self._layout.removeWidget(object)<EOL>object.hide()<EOL>if delete: object.deleteLater()<EOL><DEDENT>
Removes the supplied object from the grid. If object is an integer,
it removes the n'th object.