Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54605

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

Newsgroups comp.lang.python
Date 2013-09-22 18:44 -0700
References <0b028e65-37b2-492a-83c0-0d76d037c165@googlegroups.com> <f1b6aa95-b7fd-4241-978d-39f6f4b06f30@googlegroups.com>
Message-ID <d15710c6-051c-469d-8a90-7db720ecf62a@googlegroups.com> (permalink)
Subject Re: Why do I have to use "global" so much when using Turtle?
From rusi <rustompmody@gmail.com>

Show all headers | View raw


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/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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