[Python-Dev] try/except in io.py (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Fri Dec 19 22:00:29 CET 2008
- Previous message: [Python-Dev] try/except in io.py
- Next message: [Python-Dev] Py3k: magical dir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ok, in this case I move that we remove this try/except and see where it leads us. If we see problems during teardown, we should deal with them in a more targeted manner.
Kristján
-----Original Message----- From: Nick Coghlan [mailto:ncoghlan at gmail.com] Sent: 19. desember 2008 13:51 To: Kristján Valur Jónsson Cc: Amaury Forgeot d'Arc; Python-Dev Subject: Re: [Python-Dev] try/except in io.py
Generally speaking, close() and delete() methods that can be invoked during interpreter shutdown should avoid referencing module globals at all. Necessary globals (including members of other modules) should either be cached on the relevant class or captured in a closure.
Now, it may be that the relevant close() method in io.py touches too much code for that to be practical, but it certainly isn't the case in general that encountering Name/Attribute/ImportError during shutdown is inevitable.
- Previous message: [Python-Dev] try/except in io.py
- Next message: [Python-Dev] Py3k: magical dir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]