Created
February 16, 2012 16:30
-
-
Save jdswinbank/1846253 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 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