Skip to content

Instantly share code, notes, and snippets.

@joedougherty
Created January 30, 2016 16:17
Show Gist options
  • Select an option

  • Save joedougherty/db50a6ef6f5f3e8f1453 to your computer and use it in GitHub Desktop.

Select an option

Save joedougherty/db50a6ef6f5f3e8f1453 to your computer and use it in GitHub Desktop.
class Adapter:
def __init__(self, object, **adapted_method):
self.object = object
self.__dict__.update(adapted_method)
def __getattr__(self, attr):
return getattr(self.object, attr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment