(klass)
Iterate over direct and indirect subclasses of `klass`.
Iterate over direct and indirect subclasses of `klass`.
Iterate over direct and indirect subclasses of klass .
def deepsubclasses(klass):
  """Iterate over direct and indirect subclasses of `klass`."""
  for subklass in klass.__subclasses__():
    yield subklass
    for subsubklass in deepsubclasses(subklass):
      yield subsubklass
def deepsubclasses ( klass ) : for subklass in klass . __subclasses__ ( ) : yield subklass for subsubklass in deepsubclasses ( subklass ) : yield subsubklass