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

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 2014-09-19 11:08 +1200
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>

Show all headers | 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