Phillip J. Eby wrote: > At 05:02 PM 7/29/04 -0400, Jim Fulton wrote: > >> Guido van Rossum wrote: >> >>> But who ever uses __module__ for anything else than printing it? >> >> >> It's crucial for pickling. > > > Interesting point. That means that cPickle wouldn't work in a "module > space" without modification. The pure-Python pickle module would > unpickle into the current module space. And that might be the wrong module space. If one was going to introduce a concept of module spaces, one would need to extend the pickling machinery as well. I'll note that Python already has module spaces. They're called "packages". :) The problem with Python's current package system is that it's not possible, in general, to write packages that can be moved around within the package system, because relative imports aren't reobust or flexible enough. PEP 328 would fix this. PEP 328 would allow creation of packages that worked regardless of where there were places or that worked relative to a containing package regardless of where that was placed. You could then have different module spaces expressed by adding a new layer of top-level modules. You wouldn't need any new machinery beyond PEP 328. Jim -- Jim Fulton mailto:jim at zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
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