Jim Fulton wrote: >> out of curiosity, what are the things that make a reload not robust ? >> is it just a matter of dependencies or it's deeper ? > > > I was hoping that someone else would answer this directly. :) > Shane did largely answer it, but I'll try to be more direct and > concise: > > When you reaload a module, the module source is recompiled and > executed. Values defined in the new version overwrite values of > the same name in the old version. This has lots of implications: > > - Client modules that imported names using from: > > from oldmodule import somename > > Don't see the update. > > - Instances of classes defined in the module remain instances > of the old classes. > > - Writable global data is overwritten. This is a common source > of subtle bugs when a module defines a registry or cache. > > There are probably other interesting things I'm not thinking of. > > There are ways of working around these issues, but they require > special techniques that aren't always followed or can be defeated. > > Jim > Ok, thanks for the explanation
Tarek _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com