> > Frankly, I'm a bit confused by your post. Maybe I don't understand > > what you're proposing? > > Modules are modules, right? That is, pickle.py and cPickle.so are both > represented as module objects at runtime. A C extension can call > PyModule_GetDict() on any module. If so, then any extension module can > add names to the __dict__ of any Python module. The problem is that > modules expose their representation at the C API level (namespace > implemented as PyDictObject), so it's difficult to forbid things at the > C level. Oh sure. 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. There's plenty that C code could do but shouldn't because it breaks the world. I don't expect there will be much C in violation of this prohibition. --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