Le Tue, 2 Apr 2013 09:28:17 +0000, Kristján Valur Jónsson <krist...@ccpgames.com> a écrit : > Right, as I explained in my reply to Barry, I was imprecise. > But the “from X import Y” is the only way to invoke relative imports, > where X can have leading dots. This syntax places the constraint on X > that Y is actually an attribute of X at this time, where “import X.Y” > does not. So, even without the leading dots issue, they are not > equivalent. You run into the same circular dependency problem > without using relative imports if trying to use the “from X import Y” > where X is an absolute name.
I agree with Kristjan, it is rather annoying. And it also makes explicit relative imports harder to sell to people used to the implicit relative import style, since the latter works well in such circumstances. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com