On Wed, Oct 6, 2010 at 4:21 AM, Guido van Rossum <gu...@python.org> wrote:
> On Tue, Oct 5, 2010 at 11:17 AM, Darren Dale <dsdal...@gmail.com> wrote:
>> The issue is implementing a PEP with nice support for relative
>> imports, and then documenting that it should never be used.
>
> Isn't this mostly historical? Until the new relative-import syntax was
> implemented there were various problems with relative imports. The
> short-term solution was to recommend not using them. The long-term
> solution was to implement an unambiguous syntax. Now it is time to
> withdraw the anti-recommendation. Of course, without going overboard
> -- I still find them an acquired taste; but they have their place.

Indeed, the objections raised in those FAQ entries mostly applied to
the problems implicit relative imports could silently cause.  Explicit
relative imports will throw exceptions for those cases instead. They
read like someone took the old text and just modified it to refer to
explicit imports instead of implicit ones without softening the
language at all.

The remaining scenarios we have that can lead to duplication of a
module happen regardless of the import style you use*.

Cheers,
Nick.

*For the curious - those scenarios relate to ending up with the same
module present both as "__main__" and under its normal module name.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
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

Reply via email to