Skip to content

Instantly share code, notes, and snippets.

@mfcovington
Created May 11, 2015 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfcovington/d71eba54d2b3eaf2f8b1 to your computer and use it in GitHub Desktop.
Save mfcovington/d71eba54d2b3eaf2f8b1 to your computer and use it in GitHub Desktop.
import abc
class Greet(object):
__metaclass__ = abc.ABCMeta
def __init__(self, name):
self.name = name
@abc.abstractmethod
def hello(self):
return "Hello {}".format(self.name)
if __name__ == '__main__':
greeting = Greet('World')
print(greeting.hello())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment