MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/bfb58m/daily_python_check/elcrbv0/?context=3
r/CodingHelp • u/AnecD • Apr 20 '19
5 comments sorted by
View all comments
3
I'm a new coder I got a few questions if anyone has the time to answer.
Isn't this the old way to call the super class?
Why does super(B, self) return 1? I see it in class A but not sure why it goes to class A instead of staying in the scope of class B
4 u/galaxia232 Apr 20 '19 I got it. Class B inherits A I think. class B(A) so when it uses method f(self) it pulls A's method to return 1. cool.
4
I got it. Class B inherits A I think. class B(A) so when it uses method f(self) it pulls A's method to return 1. cool.
class B(A)
3
u/galaxia232 Apr 20 '19
I'm a new coder I got a few questions if anyone has the time to answer.
Isn't this the old way to call the super class?
Why does super(B, self) return 1? I see it in class A but not sure why it goes to class A instead of staying in the scope of class B