Message385803
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. |
|
Date |
User |
Action |
Args |
2021-01-27 19:04:41 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, eric.snow, serhiy.storchaka, stefan.mosoi |
2021-01-27 19:04:41 | brett.cannon | set | messageid: <1611774281.57.0.262755485689.issue43037@roundup.psfhosted.org> |
2021-01-27 19:04:41 | brett.cannon | link | issue43037 messages |
2021-01-27 19:04:41 | brett.cannon | create | |
|