3 ms·
Could you (or anyone else) elaborate on the issues with super() as described in this article? I'm having a hard time understanding what's going on between the c
by PhilChristensen 17y ago
Could you (or anyone else) elaborate on the issues with super() as described in this article? I'm having a hard time understanding what's going on between the complex details of the problem and the author's cumbersome syntactic choices.
- sp332 17y agoI'm not sure if this is really clear, but it's better: http://docs.python.org/library/functions.html#super http://docs.python.org/library/functions.html#super
- codexon 17y agoThe super() is magical. Functions aren't supposed to magically know what class or instance they are in unless they are explicitly passed on in Python. That's why you see the "self" argument in methods. And in the 2nd example, he shows that if you copy super to another name, then it doesn't work. Presumably meaning that super which looks like a function, actually acts like a compiler keyword in certain cases.