Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader01.nrc01.news.zen.net.uk.POSTED!not-for-mail From: Nobody Subject: Re: Why do I have to use "global" so much when using Turtle? Date: Sun, 22 Sep 2013 14:48:58 +0100 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.python References: <0b028e65-37b2-492a-83c0-0d76d037c165@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 10 Organization: Zen Internet NNTP-Posting-Host: e25768e7.news.zen.co.uk X-Trace: DXC=783ARkEem=Z:NKnQ:_cV[Sa0UP_O8AJo\=dR0\ckLKGPWeZ<[7LZNRV]4fLHb>92XRM2Z^cWRFGA[33FR^2jh1?W X-Complaints-To: abuse@zen.co.uk Xref: csiph.com comp.lang.python:54587 On Sat, 21 Sep 2013 21:39:07 -0700, John Ladasky wrote: > However, neither Screen.ontimer() not Screen.onkeypress() appear to give > me a way to pass arguments to functions of my own. Why don't they? Is > this some limitation of Tk? I have worked with other GUI's before, and I > don't remember having to jump through this particular hoop. The usual approach in Python is to pass a bound method of an object, and keep all of the data on that object.