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


Groups > comp.lang.python > #78034

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

References <CALDD_==AYbQNPu29jRoLFp8WPZaZ9mMs79334-m_z3dgdxZRJw@mail.gmail.com> <CALvWhxvvtyH0Us8+9eg+JBcooUvq1kiTVqmfU0rg1XTtcJGmVg@mail.gmail.com>
Date 2014-09-19 04:50 +1000
Subject Re: program to generate data helpful in finding duplicate large files
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14117.1411066256.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Sep 19, 2014 at 4:45 AM, Chris Kaynor <ckaynor@zindagigames.com> wrote:
>> from stat import *
>
>
> Generally, from import * imports are discouraged as they tend to populate
> your namespace and have issues with accidentally overriding imported
> functions/variables. Generally, its more Pythonic to use the other imports
> (or import as) and reference with the namespace, as you are doing everywhere
> else. The main case where from import * is recommended is API imports (for
> example, importing the API of one module into another, such as for
> inter-platform, inter-version, or accelerator support).
>

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.

ChrisA

Back to comp.lang.python | Previous | NextNext 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