Created
November 22, 2018 15:49
-
-
Save adw0rd/28cc4e2d510b498fa4592a355fcf9a16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base: | |
prop = 42 | |
other = 1 | |
def func(self): | |
print('Base func') | |
return self.prop | |
class Child(Base): | |
other = 2 | |
def func(self): | |
print('Child func') | |
super().func() | |
print(self.prop) | |
print(self.other) | |
print(super().other) | |
Child().func() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: