On 4 Dec 2002 at 16:28, Moore, Paul wrote: > BTW, on Gordon's site, in the iu documentation, he > mentions that "the assumption that sys.path is > occupied solely by strings seems ineradicable". I > don't know if he's got any specific issues in mind, > but it might be worth checking out (get the screams > of protest out of the way before the code goes in > :-)) > > I've copied Gordon in case he can give any > specifics... Code like this: for p in sys.path: x = os.path.join(p, ...) .... is very common (I patched linecache.py for this after imputil went into the std lib). Since PYTHONPATH can consist only of strings, it seems wise to tackle the issue (dealing with strings that describe non-directory collections of modules) instead of postponing it. Also seems sensible to make it so that if X works on PYTHONPATH, sys.path.append(X) should work, too. The shadowpath consists only of objects, and len(shadowpath) <= len(sys.path); it's either lazy or caching, depending on POV. [There's a metapath, too. That lets you put overrides in front. You can even override frozen and builtin modules.] -- Gordon http://www.mcmillan-inc.com/
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