Created
November 30, 2010 18:29
-
-
Save eerne/722129 to your computer and use it in GitHub Desktop.
Class inside a Class
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 Outer(): | |
def __init__(self): | |
self.test = 'LALALA LALA' | |
class Inner(): | |
def readOuter(that): | |
that.blah = self.test | |
return that.blah | |
self.inner = Inner() | |
def what(self): | |
return self.inner.readOuter() | |
instance = Outer() | |
print instance.what() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment