Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import abc
- >>> class Shape(object):
- ... __metaclass__ = abc.ABCMeta
- ... @abc.abstractmethod
- ... def method_to_implement(self, input):
- ... return
- ...
- >>> class Foo(Shape):
- ... pass
- ...
- >>> foo = Foo()
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: Can't instantiate abstract class Foo with abstract methods method_to_implement
Add Comment
Please, Sign In to add comment