Skip to content

Instantly share code, notes, and snippets.

@jdswinbank
Created February 16, 2012 16:30
Show Gist options
  • Save jdswinbank/1846253 to your computer and use it in GitHub Desktop.
Save jdswinbank/1846253 to your computer and use it in GitHub Desktop.
class Bla(object):
def __init__(self, a):
self.a = a
class Bleh(object):
def __init__(self, bla):
self.bla = bla
def __getattr__(self, name):
return getattr(self.bla, name)
my_bla = Bla("this is a bla!")
my_bleh = Bleh(my_bla)
print my_bleh.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment