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/058657.html below:

[Python-Dev] PEP 8 updates/clarifications

[Python-Dev] PEP 8 updates/clarifications [Python-Dev] PEP 8 updates/clarificationsIan Bicking ianb at colorstudy.com
Tue Dec 13 05:47:12 CET 2005
skip at pobox.com wrote:
> 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

This is already in PEP 8:

     - Imports are always put at the top of the file, just after any
       module comments and docstrings, and before module globals and
       constants.  Imports should be grouped, with the order being

       1. standard library imports
       2. related major package imports (i.e. all email package imports 
next)
       3. application specific imports

       You should put a blank line between each group of imports.

I would suggest that it should also say that __all__ goes after imports. 
  But otherwise it's all good; the Mailman style guide just goes into 
greater detail.

-- 
Ian Bicking  |  ianb at colorstudy.com  |  http://blog.ianbicking.org
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