Accessing parent objects

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Mar 25 07:46:53 EDT 2018


On Sun, 25 Mar 2018 06:11:53 -0500, D'Arcy Cain wrote:

> On 03/24/2018 06:54 PM, Steven D'Aprano wrote:
>>> On Saturday, March 24, 2018 at 1:20:24 PM UTC-5, D'Arcy Cain wrote:
>>>> I tried various forms of super() but that didn't seem to work.
>> 
>> Define "doesn't see to work".
> 
> It accesses the parent class.  I want to access the parent object.

Ah. Well, no wonder it doesn't work: you're confusing the OO inheritance 
concept of "parent" (a superclass) with whatever relationship you have 
between one instance and another instance. Just because they share the 
same name doesn't make them the same concept.


-- 
Steve




More information about the Python-list mailing list