A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/058653.html below:

[Python-Dev] PEP 8 updates/clarifications

[Python-Dev] PEP 8 updates/clarifications [Python-Dev] PEP 8 updates/clarificationsskip@pobox.com skip at pobox.com
Tue Dec 13 05:22:33 CET 2005
    >> I looked at that too, but most of these didn't jump out at me.  I'll 
    >> copy in the parts that aren't already in PEP 8 that seem possible:
    >> 
    >> From-imports should follow non-from imports.  Dotted imports should
    >> follow non-dotted imports.  Non-dotted imports should be grouped by
    >> increasing length, while dotted imports should be grouped roughly
    >> alphabetically.
    >> 
    >> This seems too complex to me for PEP 8.

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

This is subjective enough that I would think some rationale explaining this
convention should be given.  Personally, I group imports into three sections
as follows:

    * Python core modules/packages

    * Third-party modules/packages

    * Local modules/packages

I can't explain why I do it that way.  I guess it just satisfies some inner
hobgoblin.

Skip

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4