[Import-SIG] My objections to implicit package directories

Nick Coghlan ncoghlan at gmail.com
Tue Mar 13 01:48:23 CET 2012


On Tue, Mar 13, 2012 at 10:47 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Sorry, those two caveats are not completely accurate (like I said, the
> current behaviour is a hairy mess):
> - if you use explicit relative imports, you can import it under it's
> full name if you started the REPL from the parent directory of the
> package, but cannot import it from the current directory or run it
> directly
> - if you use implicit relative imports (which are supposed to be
> completely gone in Python 3), you can run it directly or import it
> under its module name if you started the REPL from the current
> directory, but cannot import it under its full name

s/current directory/directory containing the module/

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Import-SIG mailing list