+1. I was thinking along the same lines. Allowing relative imports in "import module [as X]" statements. If 'module' consists of pure dots, then "as X" is required. Otherwise, if "as X" is not present, strip the leading dot(s) when assigning the local name. K > -----Original Message----- > From: Python-Dev [mailto:python-dev- > bounces+kristjan=ccpgames.com at python.org] On Behalf Of Richard > Oudkerk > Sent: 4. apríl 2013 16:26 > To: python-dev at python.org > Subject: Re: [Python-Dev] relative import circular problem > > > 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__) > > -- >
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4