Why do I have to use "global" so much when using Turtle?
John Ladasky
john_ladasky at sbcglobal.net
Sun Sep 22 14:57:50 EDT 2013
All right, never mind!
I hacked around this morning, making some changes to parts of my program that I thought were unrelated to my namespace issues. I was paring it down to a minimal example, to post here as Ned requested. As an experiment, I also commented out the global declaration line in move_balls... and everything worked this time.
I'm baffled as to what necessitated the global declaration in the first place. But since the goal was to teach my students a graphical tool, I don't think that I will investigate this matter any further.
More information about the Python-list
mailing list