Message49296
Logged In: YES
user_id=4771
Provided this can be done with no measurable performance hit,
I guess that I'm fine with the idea. The patch needs a bit
more work, though: I don't see why it should accept dict
subclasses as globals but not arbitrary mappings (as it now
does for the locals). This is mainly an issue of removing
a few checks in various places, like EXEC_STMT and the eval()
and execfile() built-ins.
There is a missing exception check/clear in the part about
LOAD_NAME, after the PyObject_GetItem(f->f_globals, w).
A side note: in the current trunk already, LOAD_GLOBAL
contains a couple of checks, namely PyString_CheckExact()
and hash != -1. We might be able to prove in advance that
these two conditions are always true. We could then remove
the checks. Not sure the difference measurable, though. |
|
Date |
User |
Action |
Args |
2007-08-23 15:45:16 | admin | link | issue1402289 messages |
2007-08-23 15:45:16 | admin | create | |
|