Skip to content

Instantly share code, notes, and snippets.

@townie
Created September 9, 2017 03:11
Show Gist options
  • Save townie/62ccadafa6c858675e39df46972e257d to your computer and use it in GitHub Desktop.
Save townie/62ccadafa6c858675e39df46972e257d to your computer and use it in GitHub Desktop.
class KitchenSink(object):
def drain(self):
print('wash')
class NoSink(object):
def noop(self):
print('noop')
def __getattr__(self, name):
if hasattr(KitchenSink, name):
return self.noop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment