A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-March/034264.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 07:26:54 -0500
> > I'd be happy to proclaim that doing something like
> > 
> >   import X
> >   d = X.__dict__
> >   d["spam"] = 42    # or  exec "spam = 42" in d 
> > 
> > is always prohibited.
> 
> That would break lazy module imports such as the one I'm using
> in mx.Misc.LazyModule.py.

But you could rewrite LazyModule.py to use setattr(X, "spam", 42), right?

I don't think it's worth it to have a dict proxy that allows certain
keys to be set but not others.

--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