3 ms·
PEP 713 – Callable Modules
- Twirrim 4y agoI'm not sure I see strong value in this?
- onesphere 4y agoIt makes more sense to pass a ModuleType subclass to _import_ for instantiation (or put it on sys). That subclass can determine which special methods to do. Here's a simple (unrelated) import mechanism I've been working on for customization-sake: https://thetaplane.com/runtime/import https://thetaplane.com/runtime/import
- scottlawson 4y agopersonally I didn't find the motivation to be very convincing. The workarounds used today to make modules callable don't seem very difficult or problematic, and the use case is very narrow