Re: [Python-ideas] Relative import of self or parent package?

2017-04-08 Thread Nick Coghlan
On 7 April 2017 at 01:53, C Anthony Risinger wrote: > I occasionally want to do something like this: > > import .. as parent > > or: > > import . as self > > The pattern is a little less useful for namespace packages (which I've been > trying to use almost exclusively, along with

[Python-ideas] Relative import of self or parent package?

2017-04-06 Thread C Anthony Risinger
I occasionally want to do something like this: import .. as parent or: import . as self The pattern is a little less useful for namespace packages (which I've been trying to use almost exclusively, along with relative imports) than it is for __init__.py based packages, but there is still some