Reason for not allowing import twice but allowing reload()
Steven D'Aprano
steve at pearwood.info
Tue Mar 1 06:18:59 EST 2016
On Mon, 29 Feb 2016 06:01 pm, Chris Angelico wrote:
> I've never used reload() in any production code, ever. Ever.
reload() isn't intended for production code. It is a convenience for
interactive use.
I cannot imagine why you would want to reload() in production code. That
would imply that your production code is modifying already-imported
modules, then wanting to import them again. Why would anyone in their right
mind do that? Possibly because they lost a bet?
--
Steven
More information about the Python-list
mailing list