On 04/04/2013 4:17pm, Guido van Rossum wrote:
I don't really see what we could change to avoid breaking code in any
particular case -- the burden is up to the library to do it right. I
don't see a reason to forbid any of this either.

How about having a form of relative import which only works for submodules. For instance, instead of

    from . import moduleX

write

    import .moduleX

which is currently a SyntaxError.  I think this could be implemented as

    moduleX = importlib.import_module('.moduleX', __package__)

--
Richard

_______________________________________________
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