A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-March/034276.html below:

[Python-Dev] Fast access to __builtins__

[Python-Dev] Fast access to __builtins__ [Python-Dev] Fast access to __builtins__Guido van Rossum guido@python.org
Fri, 28 Mar 2003 09:33:19 -0500
> > 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.

Yeah, that's another niggling issue.  It would be a shame if using
globals() or vars() anywhere in a module would disable this
optimization.  But we can't make these return a proxy either, because
they are frequently used with e.g. "exec ... in globals()".

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4