Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python question
#2
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.
Reply


Messages In This Thread
python question - by strekasz - Mar-17-2020, 02:04 PM
RE: python question - by jefsummers - Mar-17-2020, 04:08 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020