<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 2, 2014, at 3:37 AM, <a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Always refer to modules in the same way.  Never use relative imports.</span><br></blockquote><br></div><div>Explicit relative imports preserve the benefit of being able to re-name your packages without editing every file inside them, but will still give you errors rather than silent pathological if you end up with an implicit Python path entry in the wrong place.</div><div><br></div><div>(Here is an termcast that illustrates the distinction: <<a href="http://asciinema.org/a/7016">http://asciinema.org/a/7016</a>>.)</div><div><br></div><div>Also, any absolute import in python 2 can accidentally become implicitly relative given a sufficiently unfortunate set of circumstances.  Consider using 'from __future__ import absolute_import' everywhere to make your imports less ambiguous.</div><div><br></div><div>-glyph</div><div><br></div></body></html>