[Python-Dev] Fast access to builtins (original) (raw)
Guido van Rossum guido@python.org
Fri, 28 Mar 2003 07:26:54 -0500
- Previous message: [Python-Dev] Fast access to __builtins__
- Next message: [Python-Dev] Fast access to __builtins__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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/)
- Previous message: [Python-Dev] Fast access to __builtins__
- Next message: [Python-Dev] Fast access to __builtins__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]