Mar-17-2020, 04:08 PM
In Alma __init__ needs self as the first argument
In ZoldAlma the call to Alma should be self.somevar = Alma(3)
ZoldAlma does not have x. If you changed the code as above, then obj.somevar.x can be referenced and printed.
In ZoldAlma the call to Alma should be self.somevar = Alma(3)
ZoldAlma does not have x. If you changed the code as above, then obj.somevar.x can be referenced and printed.