[Tutor] Passing a Variable

Ryan Strunk ryan.strunk at gmail.com
Mon Apr 4 07:27:53 CEST 2011


> I've read your code. Frankly I don't understand your problem. I also don't
see any occurrence of "health".
There isn't a reference to health here. My goal is to have this code act as
a checker for health, fatigue, time_remaining, or any other sort of
statistic you'd like to throw into it. My problem is that when I try:
instance = Statistic(stat=health, sound=spam, low=1, mid=15, high=30)
health can change elsewhere in the program, but the instance of statistic
class won't automatically see it.
> Also your description of the program and the program itself is kinda
overwhelming, and so much of that information is not relevant to your
question. That makes it hard to understand the question.
My apologies if this came across as verbose. I'm a newbie at all things
python, so I'm still learning everything from code to conventions.
> You can simplify the above logic:
Thank you for that. I will happily accept style suggestions whenever I can
get them.



More information about the Tutor mailing list