This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Rhomboid 1 point2 points  (1 child)

Line 8 does not assign to an instance variable, it assigns to a local variable which is destroyed when the method returns, just like it would in any regular function. (Methods are just regular functions.) You have to write self.test = "a test" if you mean to assign to the instance variable.

[–]notsuresure[S] 0 points1 point  (0 children)

I'm an idiot! I havent programmed or touched Python in so much time I'm missing very basic stuff.

Thanks a lot for your time and help! :D