Re: Determine the container class of an object in Python 3

2017-10-25 Thread Steve D'Aprano
On Thu, 26 Oct 2017 12:25 pm, qrious wrote: > Class1 is instantiated in Class2 as follows. Class2 also contains another > variable, say: > > class Class2: > class1 = Class1() > a = 0 > > I want to create a method myDef() in Class1 that can read or write to a. How > do I access a from wit

Re: Determine the container class of an object in Python 3

2017-10-25 Thread Chris Angelico
On Thu, Oct 26, 2017 at 12:25 PM, qrious wrote: > > Class1 is instantiated in Class2 as follows. Class2 also contains another > variable, say: > > class Class2: > class1 = Class1() > a = 0 > > I want to create a method myDef() in Class1 that can read or write to a. How > do I access a fr