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