Skip to content

Instantly share code, notes, and snippets.

@jdswinbank
Created January 13, 2015 22:02
Show Gist options
  • Save jdswinbank/0fb163aa7a575919ec11 to your computer and use it in GitHub Desktop.
Save jdswinbank/0fb163aa7a575919ec11 to your computer and use it in GitHub Desktop.
class Foo(object):
@property
def foo(self):
"""This foo is not implemented"""
raise NotImplementedError
def do_thing(self):
print self.foo
class Bar(Foo):
foo = "bar"
bar = Bar()
bar.do_thing() #Fine
foo = Foo()
foo.do_thing() #Boom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment