Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement