[Tutor] The Order of Imports and install order of modules andother matters (XP vs W7, ...)
Hansen, Mike
Mike.Hansen at atmel.com
Tue Feb 16 21:05:41 CET 2010
> -----Original Message-----
> From: tutor-bounces+mike.hansen=atmel.com at python.org
> [mailto:tutor-bounces+mike.hansen=atmel.com at python.org] On
> Behalf Of Kent Johnson
> Sent: Saturday, February 13, 2010 8:06 AM
> To: Wayne Watson
> Cc: Tutor Python
> Subject: Re: [Tutor] The Order of Imports and install order
> of modules andother matters (XP vs W7, ...)
>
> On Fri, Feb 12, 2010 at 10:55 PM, Wayne Watson
> <sierra_mtnview at sbcglobal.net> wrote:
> > There seems to be something of a general consensus in
> ordering import
> > statements. Something like standard library imports first.
> When using tools
> > like matlablib or tkinter (maybe), must one keep an order
> among the relevant
> > imports?
>
> I don't know if there is a general consensus but what I like to do is
> standard library imports
> third-party library imports
> application-specific imports
>
> Within each group I tend to group "import x" imports before "from x
> import y" imports and alphabetize by module name. I'm not strict about
> that though.
>
This make me wonder. Is there a document or web site that has Python Best Practices? Something along the lines of the Perl Best Practices book, but probably shorter. =)
Mike
More information about the Tutor
mailing list