Skip to content

Instantly share code, notes, and snippets.

@malkarouri
Created August 14, 2010 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malkarouri/524756 to your computer and use it in GitHub Desktop.
Save malkarouri/524756 to your computer and use it in GitHub Desktop.
>>> class D(object):
class E(object):
pass
def __init__(self):
self.e = D.E() # E must be referred to as part of the D scope
>>> d=D()
>>> d.e
<__main__.E object at 0x011D4FF0> # the representation of the nested class E misrepresents its scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment