homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients
Date 2004年06月22日.21:07:30
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4771
Quick patch attached. I didn't try to use the PyDict_GetItem trick described, but just systematically use PyObject_GetItem/SetItem/DelItem when working with f_locals.
This might confuse some extension modules that expect PyEval_GetLocals() to return a dict object.
The eval trick is now: eval(code, nondict) --> eval(code, globals(), nondict).
Besides eval() I removed the relevant typecheck from execfile() and the exec statement. Any other place I am missing?
We might want to still somehow check the type of the locals, to avoid strange errors caused by e.g. eval("a", "b"). PyMapping_Check() is the obvious candidate, but it looks like a hack.
More testing is needed. test_descrtut.py line 84 now succeeds, unexpectedly, which is interpreted as a test failure.
Needs some docs, too.
History
Date User Action Args
2007年08月23日 13:50:45adminlinkissue215126 messages
2007年08月23日 13:50:45admincreate

AltStyle によって変換されたページ (->オリジナル) /