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


Groups > comp.lang.python > #36634

Re: PyWart: Import resolution order

Date 2013-01-11 10:53 -0700
From Michael Torrie <torriem@gmail.com>
Subject Re: PyWart: Import resolution order
References <88bab977-ca49-487a-8fba-7d3350266d8d@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.406.1357926835.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 01/10/2013 11:13 PM, Rick Johnson wrote:
> 
> Python's import resolution order is terrible.[1]
> 
> The fact that Python looks in the stdlib _first_ is not a good idea.

Whether or not the default behavior is desirable or not, sys.path is set
by default to look in the current directory first on any Python
distribution I have looked at.  As Terry says, this fact causes a lot of
problems for newbies who accidentally override standard library modules
with their own python files and chaos ensues.

If your python installation does not search the current directory first,
then you must have changed sys.path.

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


Thread

PyWart: Import resolution order Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-10 22:13 -0800
  Re: PyWart: Import resolution order Chris Angelico <rosuav@gmail.com> - 2013-01-11 17:30 +1100
    Re: PyWart: Import resolution order Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 21:28 -0800
      Re: PyWart: Import resolution order Chris Angelico <rosuav@gmail.com> - 2013-01-12 17:03 +1100
      Re: PyWart: Import resolution order Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-12 00:36 -0700
        Re: PyWart: Import resolution order 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-12 19:56 -0800
        Re: PyWart: Import resolution order 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-12 19:56 -0800
    Re: PyWart: Import resolution order Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 21:28 -0800
      Re: PyWart: Import resolution order alex23 <wuwei23@gmail.com> - 2013-01-12 19:23 -0800
  Re: PyWart: Import resolution order Terry Reedy <tjreedy@udel.edu> - 2013-01-11 08:35 -0500
  Re: PyWart: Import resolution order Michael Torrie <torriem@gmail.com> - 2013-01-11 10:53 -0700
  Re: PyWart: Import resolution order Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 20:50 -0800
    Re: PyWart: Import resolution order alex23 <wuwei23@gmail.com> - 2013-01-11 23:44 -0800

csiph-web