Re: [Tutor] UnboundLocalError and Break

2009-09-30 Thread Dave Angel
Corey Richardson wrote: Luke Paireepinart wrote: If your code's more than 10 lines long or so, put it on pastebin.com and send us the link rather than inlining the whole thing. You could also send it as an attachment. Your formatting is all screwed up and I can't read

Re: [Tutor] UnboundLocalError and Break

2009-09-30 Thread bob gailer
Corey Richardson wrote: Here is my code that is being used/affected by the block that is erroring. The rest is superfluous, and does not affect it: Something is screwy. def monsAttk (damage, attack,playHp): # function expects 3 arguments monsAttk(4, 15) # passes 2 arguments That should raise T

Re: [Tutor] UnboundLocalError and Break

2009-09-30 Thread Corey Richardson
Luke Paireepinart wrote: If your code's more than 10 lines long or so, put it on pastebin.com and send us the link rather than inlining the whole thing. You could also send it as an attachment. Your formatting is all screwed up and I can't read the code at all, but I hav

[Tutor] UnboundLocalError and Break

2009-09-30 Thread Corey Richardson
Here is my code that is being used/affected by the block that is erroring. The rest is superfluous, and does not affect it: intel = 10 #Define the abilities. strn = 10 con = 10 dex = 10 wis = 10 exp = 0 cha = 10 playHp = 20 melWep = 1 # A sword rngWep = 1 #A bow

Re: [Tutor] Handling missing fields in a csv file

2009-09-30 Thread Eduardo Vieira
On Tue, Sep 29, 2009 at 3:04 PM, Dave Angel wrote: > Eduardo Vieira wrote: >> >> Hello, I have a csv file, > > a broken csv file >> >>  using the ";" as a delimiter. This file >> contains addresses. My problem is that some fields are missing in some >> rows and I would like to normalize the rows f

Re: [Tutor] Not workin!

2009-09-30 Thread Emile van Sebille
On 9/29/2009 10:32 PM Luke Paireepinart said... Oops, thanks for catching that one Marty. I thought they both evaluated to false. They do when passed to bool -- >>> bool("") == bool([]) True >>> ___ Tutor maillist - Tutor@python.org To unsubscribe

Re: [Tutor] Not workin!

2009-09-30 Thread Brett Wilkins
On 30/09/2009, at 10:44 AM, Luke Paireepinart wrote: On Tue, Sep 29, 2009 at 11:40 PM, Corey Richardson wrote: I got suggested to use this format for my code, as it was shorter and prettier. But It dun work! if wellness != ["Well","Fine","Good", "OK", "ok", "Ok", "Great", "Awesome", "Ep