Created
September 9, 2017 03:11
-
-
Save townie/62ccadafa6c858675e39df46972e257d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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