[Python-Dev] PEP: Post import hooks (original) (raw)
Phillip J. Eby pje at telecommunity.com
Thu Jan 10 18:30:04 CET 2008
- Previous message: [Python-Dev] PEP: Post import hooks
- Next message: [Python-Dev] Backporting PEP 3101 to 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 07:22 PM 1/10/2008 +1000, Nick Coghlan wrote:
Christian Heimes wrote: > A module is successfully loaded > ''''''''''''''''''''''''''''''' > > The import machinery checks if sys.postimporthooks contains post import > hooks for the newly loaded module. If hooks are found then the hooks are > called in the order they were registered with the module instance as first > argument. The processing of the hooks is stopped when a method raises an > exception. At the end the entry for the module name is removed from > sys.postimporthooks, even when an error has occured.
Doesn't the module remain in postimporthooks, only mapped to None to indicate that any hooks should be run immediately?
It should be, yes.
- Previous message: [Python-Dev] PEP: Post import hooks
- Next message: [Python-Dev] Backporting PEP 3101 to 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]