def setSize(self, width, height): try: Rectangle.setSize(self, width, height) except TypeError: Rectangle.setSize(self, int(width), int(height)) return None