On 14/02/16 23:42, [email protected] wrote: > On page 20, the variable curRad is set to a string then to a > Radiobutton. What is the purpose of setting curRad to a string? > > for col in range(3): # 3 > curRad = 'rad' + str(col) > curRad = tk.Radiobutton(win, text=colors[col], variable=radVar, > value=col, command=radCall) > curRad.grid(column=col, row=5, sticky=tk.W)
No purpose whatsoever, it looks like either a mistake or a typo. Mostly a mistake. Is there a similar piece of code elsewhere in the book that may have been cut n pasted and then badly edited? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
