From: "Just van Rossum" <just@letterror.com> > Samuele Pedroni wrote: > > > Indeed it seemed that there was consensus to want [__path__ > > manipulations] (messy, hackish or whatever they may seem). > > But, as I wrote, it *can't* work with importers in general. It can be > made to work with specific importers, such as zipimporter, but I don't > see the point (I'll rant about that in a second ;-). but such importers would better go in meta_path. Btw, reading PEP 302 it seems that when dealing with a package, first *all* importers in sys.meta_path called with fullname and __path__ of the package. For symmetry (as long as we keep __path__) I think the import mechanism would have to look for a list in __meta__path__ (or maybe just a single value in __meta_importer__): if it's absent, thing should work as described above, if it's empty, sys.meta_path should be ignored, otherwise it's content should be used instead of sys.meta_path and __path__ should be ignored up to passing it to the meta importer(s). Basically this would mean that the contents of __path__ should be interpreted/used only by the meta importer. regards
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