Created
October 8, 2015 22:23
-
-
Save michaelrice/cb6219b0298080cc67ca 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
from abc import ABCMeta, abstractmethod | |
class BaseABC(object): | |
__metaclass__ = ABCMeta | |
@abstractmethod | |
def __init__(self, *args, **kwargs): | |
pass | |
@abstractmethod | |
def foo(self): | |
pass | |
class Subclass(BaseABC): | |
def __init__(self): | |
print('poop') | |
def foo(self): | |
pass | |
assert issubclass(Subclass, BaseABC) | |
def main(): | |
sc = Subclass('testing') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment