[Python-Dev] Fast access to builtins (original) (raw)

Neil Schemenauer nas@python.ca
Fri, 28 Mar 2003 05:47:34 -0800


Guido van Rossum wrote:

I don't think it's necessary to forbid things at the C API level in the sense of making it impossible to do. We'll just document that C code shouldn't do that.

What about Python code that modifies that module dict directly? For example, using vars() or globals() to get a reference to it and doing setitem on it. My warning code only catches assignments that go through the module tp_setattro slot. I suppose warning about direct dict poking would require a proxy object to wrap the module dict.

Neil