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 brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, stefan.mosoi
Date 2021-01-27.19:04:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611774281.57.0.262755485689.issue43037@roundup.psfhosted.org>
In-reply-to
Content
Thanks for the idea, Stefan, but I'm going to close this as something we don't want to do. `importlib.reload()` purposefully takes a module object as that's what is going to get mutated/changed and it must already exist. The other importlib functions take a string because the module might not even exist yet.

And as Serhiy said, reloading is a bit dangerous and shouldn't be taken lightly. It primarily exists to reload a module when you're working in the REPL and editing a file live, not for anything fancy during execution of production code. So keeping it squarely targeted the REPL case and making it a bit harder for other cases is a good thing in my opinion.
History
Date User Action Args
2021-01-27 19:04:41brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, serhiy.storchaka, stefan.mosoi
2021-01-27 19:04:41brett.cannonsetmessageid: <1611774281.57.0.262755485689.issue43037@roundup.psfhosted.org>
2021-01-27 19:04:41brett.cannonlinkissue43037 messages
2021-01-27 19:04:41brett.cannoncreate