Skip to content

Instantly share code, notes, and snippets.

@oliverhu
Last active December 19, 2015 15:28
Show Gist options
  • Save oliverhu/5976059 to your computer and use it in GitHub Desktop.
Save oliverhu/5976059 to your computer and use it in GitHub Desktop.
from abc import ABCMeta, abstractmethod, abstractproperty
class Foo: # In Python 3, you use the syntax
_ _metaclass_ _ = ABCMeta # class Foo(metaclass=ABCMeta)
@abstractmethod
def spam(self,a,b):
pass
@abstractproperty
def name(self):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment