[Python-Dev] PEP 8 updates/clarifications

Jim Fulton jim at zope.com
Tue Dec 13 12:57:05 CET 2005


Ian Bicking wrote:
> Barry Warsaw wrote:
...

>>>This seems too complex to me for PEP 8.
>>
>>
>>Really?  ISTR adopting this convention from Guido, but I'm not 100% sure
>>about that.  After having used it for several years now, I do really
>>like this style, but I'm willing to leave the recommendation out of PEP
>>8.
> 
> 
> It seems so exacting to me;

Me too.

> stdlib, external modules, internal modules 
> seems like enough ordering to me.  If you want to order things more 
> exactly, sure, but I don't really see the point personally.  Since I 
> can't assume as a reader that imports are ordered in any way I have to 
> search to be sure of what's there.  The grouping help me browse, but I'd 
> hope that the import list is short enough that I don't need to use 
> alphabetization to scan for a module.

Personally, I don't find the stdlib/external distinction to be useful.

Personally, I'd rather just sort aphabetically based on dotted package
name.  Because packages provide meaningful groupings to begin with,
this approach provides the most meaningful groupings to me.  (All of
my "internal" modules are in packages.)  When scanning imports, I
don't want to have to think about whether a module is internal or
external.  I've got enough to think about without that. :)

Frankly, I'd be as happy t see the PEP be silent on module ordering.

Jim


-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Python-Dev mailing list