Why do I have to use "global" so much when using Turtle?

rusi rustompmody at gmail.com
Sun Sep 22 21:44:35 EDT 2013


On Monday, September 23, 2013 12:27:50 AM UTC+5:30, John Ladasky wrote:
> 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.

Not related to your question but to turtle graphics
Have you seen this?
http://code.google.com/p/pynguin/



More information about the Python-list mailing list