This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients Anthony Sottile, Arfrever, brett.cannon, eric.snow, ncoghlan, python-dev
Date 2019-06-26.20:00:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561579211.9.0.807667103511.issue23014@roundup.psfhosted.org>
In-reply-to
Content
> Mostly looking for something that says how `create_module` should / shouldn't be implemented

Basically you only need to provide the method if you want to use a custom object for the module itself. So as long as the object can quack like a module object you should be fine.

> (and why `return None` is necessary)

The "return None for default semantics" is there for two reasons (if I remember correctly). One, it makes it very easy to implement the default semantics. :) Two, it sends a very clear signal that nothing out of the ordinary is going on and so you can assume nothing special is expected (which is why LazyLoader requires this since it mucks with the object directly in a very specific way).
History
Date User Action Args
2019-06-26 20:00:11brett.cannonsetrecipients: + brett.cannon, ncoghlan, Arfrever, python-dev, eric.snow, Anthony Sottile
2019-06-26 20:00:11brett.cannonsetmessageid: <1561579211.9.0.807667103511.issue23014@roundup.psfhosted.org>
2019-06-26 20:00:11brett.cannonlinkissue23014 messages
2019-06-26 20:00:11brett.cannoncreate