diff --git a/samples/roses/clroses.py b/samples/roses/clroses.py index 51ba2947..1d7ea3dc 100644 --- a/samples/roses/clroses.py +++ b/samples/roses/clroses.py @@ -107,7 +107,7 @@ class rose: if stop >= self.endpt: stop = self.endpt keep_running = False - for i in range (self.nextpt, stop + 1): + for i in range (self.nextpt, int(stop + 1)): theta = (self.style * i) % self.nvec r = self.cos_table[(self.petals * theta) % self.nvec] line.append((r * self.cos_table[theta], r * self.sin_table[theta])) @@ -159,7 +159,7 @@ class rose: new_state = self.INT_DRAW self.takesvec = self.nvec / self.gcd(self.nvec, self.style) - if not self.takesvec & 1 and self.petals & 1: + if not int(self.takesvec) & 1 and int(self.petals) & 1: self.takesvec /= 2 if self.cmd_state == self.CMD_GO: if self.minvec > self.takesvec or self.maxvec < self.takesvec: diff --git a/samples/roses/wxroses.py b/samples/roses/wxroses.py index 7bfbdea5..a12a7103 100644 --- a/samples/roses/wxroses.py +++ b/samples/roses/wxroses.py @@ -453,7 +453,7 @@ class MyFrame(wx.Frame, clroses.rose): # Command buttons change their names based on the whether we're in auto # or manual mode. def AppCmdLabels(self, labels): - for name, label in map(None, ('Go', 'Redraw', 'Backward', 'Forward'), labels): + for name, label in zip(('Go', 'Redraw', 'Backward', 'Forward'), labels): ctrl_buttons[name].SetLabel(label) ctrl_buttons[name].SetForegroundColour(self.labelColours[label])