On Feb 19, 2009, at 11:03 AM, Jim Fulton wrote:
> I sort my imports.  Period. This makes from imports come before
> regular imports (because f comes before i).  I discourage from
> imports, so this isn't much of an issue for me except for old code.
> Having imports sorted takes very little effort and makes imports
> easier to find and duplicated easier to spot. Grouping imports makes
> imports harder to maintain and read, especially since groupings are
> arbitrary unless they follow package boundaries, and just sorting
> imports groups imports by package boundaries.

Exactly .  As I mentioned in the previous post, sorting is the *key*  
here.  [Pun intended].
Grouping (python, zope., myapp. modules order), or non-grouping,  
becomes a non-issue when imports are sorted.


> BTW, I strongly discourage from imports. (I didn't always have this
> opinion, but have seen the error of my ways. Thanks to Fred Drake for
> nudging me in this direction.) IMO, this is wildly more important than
> any of the issues raised in this thread.

Very important for code maintenance/readability!


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to