`'NamespaceLoader' in repr(loader)` is also ugly as hell. The problem is that parts of importlib is compiled in a frozen module, and those classes are separated from what we have defined in `importlib._bootstrap`.  `NamespaceLoader` class doesn't even have a `__name__` attribute.  Anyways, I'll take a look at this again today.