-
-
Save anonymous/189df066ed264fae8ea2 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 Foo(object): | |
def __call__(self): | |
raise NotImplementedError | |
def do_something_when_called(self): | |
# do work for all derived classes | |
class Bar(Foo): | |
def __call__(self): | |
self.do_something_when_called() | |
# do more work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment