fiberlab.util module
Miscellaneous package utilities.
- fiberlab.util.all_subclasses(cls)[source]
Collect all the subclasses of the provided class.
The search follows the inheritance to the highest-level class. Intermediate base classes are included in the returned set, but not the base class itself.
Thanks to: https://stackoverflow.com/questions/3862310/how-to-find-all-the-subclasses-of-a-class-given-its-name
- Parameters
cls (object) – The base class
- Returns
The unique set of derived classes, including any intermediate base classes in the inheritance thread.
- Return type
set