Richard Oudkerk added the comment:

In Torsten's example

    from . import moduleX

can be replaced with

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


    moduleX = importlib.import_module('package.moduleX')

If that is not pretty enough then perhaps the new syntax

    import .moduleX

could be introduced and made equivalent to (*).

nosy: +sbt

Python tracker <>
Python-bugs-list mailing list

Reply via email to