It worked! in this code but im getting a '<module2.cmod2 object at 0x0000000002918208>' whenever i try to show it.
I just tried this and gives
from module2 import cmod2 plannerlist = [] def meth31(): planner = [] add = cmod2() add.meth22() # myobject4.add() # cmod2.meth22() # add = cmod2.add() planner.append(add) plannerlist.append(planner) pickle.dump(plannerlist, open('pl','wb')) print('Your plan:') for planner in plannerlist: print(*planner) return planner #show
(Jan-17-2019, 04:44 PM)ichabod801 Wrote: Well, you are never calling meth22, so the add attribute of cmod2 never gets set.
Change line 10 toadd = cmod2.meth22()
.
I just tried this and gives
Error:TypeError: meth22() missing 1 required positional argument: 'self'