Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51489 > unrolled thread

Re: import syntax

Started byDevyn Collier Johnson <devyncjohnson@gmail.com>
First post2013-07-29 16:23 -0400
Last post2013-07-29 16:23 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: import syntax Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-29 16:23 -0400

#51489 — Re: import syntax

FromDevyn Collier Johnson <devyncjohnson@gmail.com>
Date2013-07-29 16:23 -0400
SubjectRe: import syntax
Message-ID<mailman.5264.1375129414.3114.python-list@python.org>
On 07/29/2013 04:20 PM, Tim Chase wrote:
> On 2013-07-29 16:09, Dave Angel wrote:
>> On 07/29/2013 03:48 PM, Devyn Collier Johnson wrote:
>>> The PEP8 recommends importing like this:
>>>
>>> import os
>>> import re
>>>
>>> not like this:
>>>
>>> import os, re
>> I got a bit further, and if I'm only using a couple of functions
>> from the import, I'll list them in the comment.
> If I just plan to use a small subset, I tend to reach for the
>
>    from sys import stdout, stderr, exit
>
> sort of syntax.  I find it makes my code read a bit more cleanly than
> having to type "sys.stderr.write(...)" everywhere but is still pretty
> readable.
>
> -tkc
>
>
So, there are no advantages or disadvantages when disregarding readability?

DCJ

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web