On 29/11/14 19:37, Nathaniel Smith wrote:
[snip]
- The "new module" object has to be a subtype of ModuleType, b/c there are lots of places that do isinstance(x, ModuleType) checks (notably
It has to be a *subtype* is does not need to be a *subclass*
class M:
... __class__ = ModuleType ...
isinstance(M(), ModuleType)
True Cheers, Mark. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com