Re: sharing persisten cache between modules

2006-10-24 Thread Steve Holden
Dennis Lee Bieber wrote: > On 23 Oct 2006 09:45:33 -0700, "Bart Ogryczak" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > >>The problem is, that then it is not shared. If I do it like that, each >>module has it´s own copy of the cache. Maybe I´m doing something >>wrong.

Re: sharing persisten cache between modules

2006-10-24 Thread Bart Ogryczak
Dennis Lee Bieber wrote: > f-i-* creates local names initially bound to the objects inside a > module, but any "assignment" to such a name later results in the name > being rebound to the new object -- disconnecting from the original. Great! That was it. Thank you! :-) -- http://mail.python.org

Re: sharing persisten cache between modules

2006-10-23 Thread Fredrik Lundh
Bart Ogryczak wrote: >> why not just put the cache management >> code in a module that's imported by any submodule that wants to use it ? > > The problem is, that then it is not shared. If I do it like that, each > module has it´s own copy of the cache. nope. modules are shared, and all module-

Re: sharing persisten cache between modules

2006-10-23 Thread Steve Holden
Bart Ogryczak wrote: > Fredrik Lundh wrote: > >>Bart Ogryczak wrote: >> >> >>>I´ve got a problem creating persistent cache, that would be shared >>>between modules. There a supermodule, which calls submodules. I´d like >>>submodules to use cache created in the supermodule. The only way I see >>>ri

Re: sharing persisten cache between modules

2006-10-23 Thread Bart Ogryczak
Fredrik Lundh wrote: > Bart Ogryczak wrote: > > > I´ve got a problem creating persistent cache, that would be shared > > between modules. There a supermodule, which calls submodules. I´d like > > submodules to use cache created in the supermodule. The only way I see > > right now, is to pass it as

Re: sharing persisten cache between modules

2006-10-23 Thread Fredrik Lundh
Bart Ogryczak wrote: > I´ve got a problem creating persistent cache, that would be shared > between modules. There a supermodule, which calls submodules. I´d like > submodules to use cache created in the supermodule. The only way I see > right now, is to pass it as function argument, but that woul

sharing persisten cache between modules

2006-10-23 Thread Bart Ogryczak
Hi, I´ve got a problem creating persistent cache, that would be shared between modules. There a supermodule, which calls submodules. I´d like submodules to use cache created in the supermodule. The only way I see right now, is to pass it as function argument, but that would require a change in API,