![](https://secure.gravatar.com/avatar/b264e73c1ffddd01346a811dbaff18a4.jpg?s=120&d=mm&r=g)
On Thu, 14 May 2009 16:01:55 +0100, Paul Moore <p.f.moore@gmail.com> wrote:
The main point here is to emphasize that there are some fairly obscure ways for directories to end up in sys.path, even if we exclude user code. The proposal needs to make a statement on how all such cases are handled - I don't have any particular opinion on *what* should happen, just that it gets documented.
My take on it is that sys.path get's messed with too easily. Any item added in sys.path causes a full directory search to happen which is fairly time consuming. The best solution in performance is one where sys.path is limited to a handful of entries (say ./, user-packages, site-packages) and any packages that are stored are referenced in .PTH files along those three paths. Of course, I'm being way too simplistic here... and in the real world many systems aren't like that.... yet.... lol but who knows what the future can bring.... David