Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python class
# python 2
from abc import abstractmethod, ABCMeta
ABC = ABCMeta('ABC', (object,), {'__slots__': ()})
class AbstractClassExample(ABC):
@abstractmethod
def do_something(self):
pass
# python 3
from abc import ABC, abstractmethod
class AbstractClassExample(ABC):
@abstractmethod
def do_something(self):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.