[Python-3000] Misc. thoughts & questions re: xreload
Guido van Rossum
guido at python.org
Sat Mar 17 00:39:44 CET 2007
You missed that it's a work in progress. I'll come back to it at some point.
On 3/16/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> This is probably one of those cases where I've missed something obvious,
> but shouldn't it be sufficient for xreload() to use reload() to perform the
> central step of running the code in the cleared module dictionary?
> There doesn't seem to be any reason to emulate all that reload() machinery,
> and it would then work for any and all importers (not to mention chopping
> out a bunch of code). I'm also not clear on why the module dictionary even
> needs to be cleared, though it seems reasonable enough. However, *not*
> clearing it would allow modules to be written so as to accomodate not
> clearing global data structures during reloading, by checking whether the
> structure already exists.
> Btw, the _update() function looks like a great place to use that wonderful
> generic function prototype of Guido's, since it would allow developers to
> add extra reloading support for specialty objects, such as say, interfaces. ;-)
> Python-3000 mailing list
> Python-3000 at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000