Accessing parent objects

Rick Johnson rantingrickjohnson at gmail.com
Sat Mar 24 23:08:47 EDT 2018


On Saturday, March 24, 2018 at 9:29:02 PM UTC-5, Chris Angelico wrote:
> So tell me, how do these other (beautifully intuitive)
> languages handle multiple inheritance? I'm sure it's really
> easy to make super() work when there's exactly one
> superclass that you can lock in at compile time.

After sending my response to Steven, i began to ponder why i
had rejected Python's super (because, after all, it's been a
few years now, and frankly, i forgot), and i realized it was
more a matter of consistency.

You see, Tkinter (the Py2 version) uses old style classes
(though i beleve that design flaw has been rectified in
Py3), and being that i rely heavily on Tkinter for a large
portion of my GUI apps (not because i necessarily prefer
Tkinter over the other offerings, mind you, but simply
because it is in the stdlib) the inconsistency of using
super _outside_ of Tkinter code whilst simultaneously using
explicit inheritance _inside_ Tkinter code was quite
frankly, disturbing to me. Thus, i chose to abandon super
altogether.

But when i make the switch to Python4000, i will probably
adopt super at that time, along with all the other fully
matured goodies.

In light of this revelation, I still don't believe Python's
super() function is as intuitive, as say, Ruby's super
statement is, but it is the correct way to do things,
nonetheless.

So yeah, i'll have to cross that rickety old bridge at some
point in the future. Just not right now.



More information about the Python-list mailing list