Re: [Tutor] GameTracker help

2012-02-25 Thread Mark Lawrence
On 25/02/2012 15:37, Joel Goldstick wrote: On Sat, Feb 25, 2012 at 5:57 AM, Mike Nickey wrote: I think I found the issue. It seems that the UserOppSkillLvl wasn't passing the integer version of this variable back. Changing line 97 from return UserOppSkillLvl to return int(UserOppSkillLv

Re: [Tutor] Staticmethod & Classmethod Question

2012-02-25 Thread Steven D'Aprano
Chris Kavanagh wrote: I know this will sound stupid, but why would the method care which instance it's called on?? I think this is where my confusion is coming in. . .I hope I've made sense here. . . Typical use for class instances is to store per-instance information. For example, both "sp

Re: [Tutor] Staticmethod & Classmethod Question

2012-02-25 Thread Chris Kavanagh
On 2/25/2012 4:34 AM, Dave Angel wrote: On 02/25/2012 03:31 AM, Chris Kavanagh wrote: Hey Everyone, I came across this code in 'A Byte Of Python' & realized there was a line I didn't understand. The line is "howMany = staticmethod(howMany)" (Complete code pasted below.) I don't think, in my

Re: [Tutor] GameTracker help

2012-02-25 Thread Joel Goldstick
On Sat, Feb 25, 2012 at 5:57 AM, Mike Nickey wrote: > I think I found the issue. It seems that the UserOppSkillLvl wasn't > passing the integer version of this variable back. > Changing line 97 from >    return UserOppSkillLvl > to >    return int(UserOppSkillLvl) >  seems to have helped. > > Any

Re: [Tutor] GameTracker help

2012-02-25 Thread Mike Nickey
I think I found the issue. It seems that the UserOppSkillLvl wasn't passing the integer version of this variable back. Changing line 97 from return UserOppSkillLvl to return int(UserOppSkillLvl) seems to have helped. Any suggestions on how to implement the UserSkillLvl section so it's not

Re: [Tutor] GameTracker help

2012-02-25 Thread Joel Goldstick
On Sat, Feb 25, 2012 at 5:07 AM, Mike Nickey wrote: > Hey all, > > I'm trying to wok on a game tracker for my friends. What I have here > partly works but there are areas that I want to change and some areas > that are just not working for me. > > The areas that I am having difficulty with are the

[Tutor] GameTracker help

2012-02-25 Thread Mike Nickey
Hey all, I'm trying to wok on a game tracker for my friends. What I have here partly works but there are areas that I want to change and some areas that are just not working for me. The areas that I am having difficulty with are the def pointsNeeded and oppPointsNeeded. What is strange to me is t

Re: [Tutor] Staticmethod & Classmethod Question

2012-02-25 Thread Dave Angel
On 02/25/2012 03:31 AM, Chris Kavanagh wrote: Hey Everyone, I came across this code in 'A Byte Of Python' & realized there was a line I didn't understand. The line is "howMany = staticmethod(howMany)" (Complete code pasted below.) I don't think, in my very short Python career, I've h

Re: [Tutor] Staticmethod & Classmethod Question

2012-02-25 Thread Alan Gauld
On 25/02/12 08:31, Chris Kavanagh wrote: I don't think, in my very short Python career, I've heard of a staticmethod or classmethod. There's very little explanation of them in the book. I've googled them, but am still confused on exactly what they are & why they should be used. The only sense I

[Tutor] Staticmethod & Classmethod Question

2012-02-25 Thread Chris Kavanagh
Hey Everyone, I came across this code in 'A Byte Of Python' & realized there was a line I didn't understand. The line is "howMany = staticmethod(howMany)" (Complete code pasted below.) I don't think, in my very short Python career, I've heard of a staticmethod or classmethod. There's very