Re: UnboundLocalError - (code is short & simple)

2009-09-28 Thread New User
illiers wrote: From: Bruno Desthuilliers Subject: Re: UnboundLocalError - (code is short & simple) To: python-list@python.org Date: Monday, September 28, 2009, 8:24 AM Chris Rebert a écrit : > On Sun, Sep 27, 2009 at 8:5

Re: UnboundLocalError - (code is short & simple)

2009-09-28 Thread New User
rtin --- On Mon, 9/28/09, Chris Kaynor wrote: From: Chris Kaynor Subject: Re: UnboundLocalError - (code is short & simple) To: python-list@python.org Date: Monday, September 28, 2009, 4:00 PM On Sun, Sep 27, 2009 at 10:39 PM, New User wrote: Hi Chris, Thank you for the reply and info!

Re: UnboundLocalError - (code is short & simple)

2009-09-28 Thread Chris Kaynor
on the python list - I just forgot to remove you from it (I used G-Mail's reply all). In general, unless the reply is off-topic or personal, it should be replied to on-list. This allows more people to both see the answer and to help further explain the answer. > > --- On *Mon, 9/28/09, Chris Ka

Re: UnboundLocalError - code is short & simple

2009-09-28 Thread Francesco Bochicchio
On Sep 28, 6:07 am, pylearner wrote: > System Specs: > > Python version = 2.6.1 > IDLE > Computer = Win-XP, SP2 (current with all windows updates) > > ---­- > > Greetings: > > I have written code for two things:  1

Re: UnboundLocalError - (code is short & simple)

2009-09-28 Thread Bruno Desthuilliers
Chris Rebert a écrit : On Sun, Sep 27, 2009 at 8:53 PM, pylearner wrote: --- Traceback (most recent call last): File "", line 1, in toss_winner() File "C:/Python26/toss_winner.py", line 7, in toss_winner coin_toss = coin

Re: UnboundLocalError - (code is short & simple)

2009-09-27 Thread Chris Rebert
On Sun, Sep 27, 2009 at 8:53 PM, pylearner wrote: > --- > > Traceback (most recent call last): >  File "", line 1, in >    toss_winner() >  File "C:/Python26/toss_winner.py", line 7, in toss_winner >    coin_toss = coin_toss() > Unb

Re: UnboundLocalError - (code is short & simple)

2009-09-27 Thread Chris Kaynor
Lets look at what is happening on a few of the lines here: First: from coin_toss import coin_toss imports the module coin_toss and sets the local variable coin_toss to the value of coin_toss in the module coin_toss. Second: coin_toss = coin_toss() calls the function bound to the name coin_toss

UnboundLocalError - code is short & simple

2009-09-27 Thread pylearner
System Specs: Python version = 2.6.1 IDLE Computer = Win-XP, SP2 (current with all windows updates) Greetings: I have written code for two things: 1) simulate a coin toss, and 2) assign the toss result to

UnboundLocalError - (code is short & simple)

2009-09-27 Thread pylearner
Python version = 2.6.1 IDLE Computer = Win-XP, SP2 (current with all windows updates) --- Greetings: I have written code for two things: 1) simulate a coin toss, and 2) assign the toss result to a winner. Code for the simulated coin t