[Python-Dev] Fast access to __builtins__
Fri, 28 Mar 2003 10:31:30 +0100
On Friday 28 March 2003 05:49 am, Guido van Rossum wrote:
> I don't see the problem. Typically, C extension modules don't have
> Python code that runs in their globals, so messing with a C
> extension's globals from the outside has no bad effect on Python code.
It happens, though -- for code whose performance is not important,
e.g. initialization and "resetting" kind of stuff, a PyRun_String can be
SO much more concise and handier than meticulous expansion of
basically the same things into tens of lines of C code... since
"messing from the outside" happens after initialization, and the use
cases I can easily find are all specifically DURING initialization, it may
be that this problem is too rare to worry about, but, I'm not so sure.