Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54596
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-09-22 11:57 -0700 |
| References | <0b028e65-37b2-492a-83c0-0d76d037c165@googlegroups.com> |
| Message-ID | <f1b6aa95-b7fd-4241-978d-39f6f4b06f30@googlegroups.com> (permalink) |
| Subject | Re: Why do I have to use "global" so much when using Turtle? |
| From | John Ladasky <john_ladasky@sbcglobal.net> |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why do I have to use "global" so much when using Turtle? John Ladasky <john_ladasky@sbcglobal.net> - 2013-09-21 21:39 -0700
Re: Why do I have to use "global" so much when using Turtle? Peter Otten <__peter__@web.de> - 2013-09-22 10:15 +0200
Re: Why do I have to use "global" so much when using Turtle? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-22 10:43 +0000
Re: Why do I have to use "global" so much when using Turtle? Ned Batchelder <ned@nedbatchelder.com> - 2013-09-22 06:56 -0400
Re: Why do I have to use "global" so much when using Turtle? Nobody <nobody@nowhere.com> - 2013-09-22 14:48 +0100
Re: Why do I have to use "global" so much when using Turtle? John Ladasky <john_ladasky@sbcglobal.net> - 2013-09-22 11:57 -0700
Re: Why do I have to use "global" so much when using Turtle? rusi <rustompmody@gmail.com> - 2013-09-22 18:44 -0700
Re: Why do I have to use "global" so much when using Turtle? John Ladasky <john_ladasky@sbcglobal.net> - 2013-09-23 00:26 -0700
csiph-web