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


Groups > comp.lang.python > #78051

Re: program to generate data helpful in finding duplicate large files

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Re: program to generate data helpful in finding duplicate large files
Date Fri, 19 Sep 2014 11:08:56 +1200
Lines 20
Message-ID <c8170bF2nokU1@mid.individual.net> (permalink)
References <CALDD_==AYbQNPu29jRoLFp8WPZaZ9mMs79334-m_z3dgdxZRJw@mail.gmail.com> <CALvWhxvvtyH0Us8+9eg+JBcooUvq1kiTVqmfU0rg1XTtcJGmVg@mail.gmail.com> <mailman.14117.1411066256.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net pJnVVzBDUpys7uY2tTz49A7T5/38voY/ilYD/hGKQ9hp8dixhd
Cancel-Lock sha1:Q+fW3BAPwOltTWT/77a7tHeB5hQ=
User-Agent Mozilla Thunderbird 1.0.5 (Macintosh/20050711)
X-Accept-Language en-us, en
In-Reply-To <mailman.14117.1411066256.18130.python-list@python.org>
Xref csiph.com comp.lang.python:78051

Show key headers only | View raw


Chris Angelico wrote:
> On Fri, Sep 19, 2014 at 4:45 AM, Chris Kaynor <ckaynor@zindagigames.com> wrote:
> 
>>>from stat import *
> 
> I was going to say the same thing, except that this module
> specifically is documented as recommending that. I still don't like
> "import *", but either this is a special case, or the docs need to be
> changed.

I think it's something of a special case. The main issue with
import * is that it makes it hard for someone reading the code
to tell where names are coming from.

However, all the names in the stat module are prefixed with
S_ or ST_ and are well-known stat-related names from the unix
C library, so there is less room for confusion in this case.

-- 
Greg

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: program to generate data helpful in finding duplicate large files Chris Angelico <rosuav@gmail.com> - 2014-09-19 04:50 +1000
  Re: program to generate data helpful in finding duplicate large files Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-09-19 11:08 +1200

csiph-web