Skip to content

Instantly share code, notes, and snippets.

@michaelrice
Created October 8, 2015 22:23
Show Gist options
  • Save michaelrice/cb6219b0298080cc67ca to your computer and use it in GitHub Desktop.
Save michaelrice/cb6219b0298080cc67ca to your computer and use it in GitHub Desktop.
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