Phillip J. Eby wrote: > Note that in my implementation, an entry is added to sys.modules > immediately, so this scenario can't happen without *replacing* the > sys.modules entry.
I like to separate the implementation of the post import hook from lazy modules. I think that the hook and lazy modules can be implemented independently. >> * module is loaded with __import__() but callbacks weren't fired yet >> o the existing import mechanism is called >> o after the module is loaded and inserted into sys.modules >> the callbacks are fired in reverse order (FILO). > > Why not FIFO? I don't have a strong opinion on the order. I can life with FIFO, too. What should happen if a post import hook fails? Should the error be catch and reported or should the chain stop? Christian _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com