Rob Gaddi wrote: > Does anyone know the history of why relative imports are only available > for packages and not for "programs"? It certainly complicates life. >
Really, no one? It seems like a fairly obvious thing to have included; all of the reasons that you want to be explicit in saying: from . import mypkg in a package apply just as well in an executable script. But instead, they've got different semantics such that you expressly _cannot_ use relative imports in a script. This feels like such a glaring oversight that there must have been some rationale behind it. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list