First off, thanks for the answer. I don't see the cached module as a problem 
here. If you provide arguments to a module, the goal is "most likely" to 
alter/parameterize the behavior of the first import. Now, I agree that behavior 
becomes unpredictable because passing different parameters on subsequent 
imports won't change the behavior of the imported module . One thing that could 
be done is to memoize those imports based on the parameters (this is a huge 
change to how imports works so its a bit yikes). Another solution would be to 
simply not cache parameterized imports. You sacrifice performance for added 
flexibility which I think is fair. I do however agree about partial imports. It 
would be rather complex to properly pass the context but its certainly doable.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to