Skip to content

Instantly share code, notes, and snippets.

@sdiehl
Created September 5, 2010 17:13
Show Gist options
  • Save sdiehl/566177 to your computer and use it in GitHub Desktop.
Save sdiehl/566177 to your computer and use it in GitHub Desktop.
def generate(icls):
strs = []
def descend(cl):
for cls in cl.__subclasses__():
strs.append('[%s]^[%s|%s]' % (cl.__name__,cls.__name__, ';'.join(cls.__dict__.keys())))
descend(cls)
descend(icls)
for st in strs:
print st
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment