[Python-3000] Misc. thoughts & questions re: xreload (original) (raw)
Guido van Rossum guido at python.org
Sat Mar 17 00:39:44 CET 2007
- Previous message: [Python-3000] Misc. thoughts & questions re: xreload
- Next message: [Python-3000] Fwd: Re: Octal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] Misc. thoughts & questions re: xreload
- Next message: [Python-3000] Fwd: Re: Octal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]