> why do you do this each time in a double for loop? shouldn't one such call after the double loop be enough?

That's exactly what the comment is trying to explain (although it could be more elaborate)...

In order to catch stuff that is added dynamically, we need to do this module by module.
While implementing this, I noticed I was missing subclasses. It *seems* like the 'abstract' `ModuleNamingScheme` for which we want to obtain subclasses isn't recognized as being identical across imported module naming scheme Python modules.
Thus, the `ModuleNamingScheme` class that is available in `easybuild_module_naming_scheme` (because it gets imported there from `easybuild.tools.module_naming_scheme`) isn't considered to be the same as the one available in `my_module_naming_scheme`. It admit that is strange, but I have no other explanation for subclasses being missing if I simply use `get_subclasses(ModuleNamingScheme)`.