
On Mon, 4 Apr 2022 at 03:33, malmiteria <martin.milon@ensc.fr> wrote:
Chris Angelico writes:
And is it still based on the fundamental assumption that super() calls THE parent class? what are you even talking about?
I'm talking about this:
feature 1 (of super alone): proxying the parent. What most people think super does (and expect it to do): it allows to call method from *the* (most people don't think of multiple inheritance) parent. It can be used by working around MRO to proxy any parent directly.
You start out with the assumption that MOST PEOPLE think of super as a way to call THE, singular, parent. If this is indeed a problem, then it's not a problem with super, it's a problem with expectations. And you're talking about *working around* the MRO, as if it's a problem. I got a little bit further into your post and found you fighting hard against the existing feature, and that's when I gave up on reading it. Obviously you're going to have problems if you completely misunderstand a feature and then try to work around those expectations. The same happens when people start by assuming that "for-else" loops will run the else clause if the iterable is empty. You've already been given a solution to your problem: if you don't want super, don't use super. The purpose of super is not what you're doing with it. Learn how super is meant to be used, then decide whether it's right for your class hierarchy. Also - you stand a FAR better chance of your proposal being read if you spend the time and effort to edit it down to something manageable. A gigantic wall of typo-filled text is not something we're going to want to sift through. At the very least, test all your code blocks and fix the typos in those. ChrisA