find_subclass

  • full name: tenpy.tools.misc.find_subclass

  • parent module: tenpy.tools.misc

  • type: function

tenpy.tools.misc.find_subclass(base_class, subclass_name)[source]

For a given base class, recursively find the subclass with the given name.

Parameters
  • base_class (class) – The base class of which subclass_name is supposed to be a subclass.

  • subclass_name (str) – Name of the class to be found.

Returns

subclass – Class with name subclass_name which is a subclass of the base_class. None, if no subclass of the given name is found.

Return type

None | class