Skip to content

Instantly share code, notes, and snippets.

@eerne
Created November 30, 2010 18:29
Show Gist options
  • Save eerne/722129 to your computer and use it in GitHub Desktop.
Save eerne/722129 to your computer and use it in GitHub Desktop.
Class inside a Class
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