def _walk_subclasses(klass):
 for sub in klass.__subclasses__():
  (yield sub)
  for subsub in _walk_subclasses(sub):
   (yield subsub)

def _walk_subclasses ( klass ) : for sub in klass . __subclasses__ ( ) : ( yield sub ) for subsub in _walk_subclasses ( sub ) : ( yield subsub )
recursively walk subclass tree .