Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 4 Online
OpenStudy (microbot):

assume you have class1(object) and class2(object). how can i access the method and attributes of class1 from class2? (none is subclass of the other) syntactically speaking. in python.

OpenStudy (anonymous):

someplace in class2 instantiate a class1 object: aclass1Object = class1( ) now access a thing in class1: c = aclass1Object.thing

OpenStudy (microbot):

ty will try that.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!