Jul-26-2019, 07:24 PM
For frigider and aragaz, subclasa is defined outside the __init__ method but inside the class, so it is a class attribute, which is stored for later use. For the others, subclasa is defined in the __init__ method (without using self), so they are just local variables that go away after the __init__ method executes. You either need to define them as self.name = value, or move them out of the __init__ method like the other two.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures