Created
May 30, 2020 08:54
-
-
Save eclecticmiraclecat/5616c0844e680cfed69153b3e4f14907 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Foo: | |
... def hello(self): | |
... print(self.__class__.__name__) | |
... | |
>>> class Bar(Foo): | |
... pass | |
... | |
>>> b = Bar() | |
>>> b.hello() | |
Bar | |
>>> f = Foo() | |
>>> f.hello() | |
Foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment