Re: Importing modules with arguments

2021-07-30 Thread Chris Angelico
On Sat, Jul 31, 2021 at 5:11 AM Charles Smith wrote: > > 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

Re: Importing modules with arguments

2021-07-30 Thread Charles Smith
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

Re: Importing modules with arguments

2021-07-30 Thread Chris Angelico
On Sat, Jul 31, 2021 at 3:48 AM Charles Smith wrote: > > I have found myself wanting to import module and provide arguments to them. > There's two main reason I could think of for this. First is to prevent a > circular import, though most of circular imports can be prevented by changing > the

Importing modules with arguments

2021-07-30 Thread Charles Smith
I have found myself wanting to import module and provide arguments to them. There's two main reason I could think of for this. First is to prevent a circular import, though most of circular imports can be prevented by changing the design. The second reason is to invert dependencies between two