On Sat, 12 Oct 2013 23:35:23 +0200 Christian Heimes <christ...@python.org> wrote: > Am 12.10.2013 19:02, schrieb Antoine Pitrou: > > If you grow sys.path, imports get slower. > > (IMHO it also makes the source tree more cumbersome to navigate) > > It shouldn't slow down successful imports. The module finder stops at > first hit.
You're forgetting that *other* directories can be appended to sys.path (e.g. the site-packages directories), or any of setuptools' magic things. > A directory with pure Python modules is less cumbersome than a couple > of facade modules or intended code in try/except ImportError blocks. I don't find it cumbersome to be explicit here. It makes it obvious what happens. It also makes it extra easy to import the pure Python if desired (for example for unit tests, or for benchmarking). Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com