Re: PEP 328, absolute/relative import

2005-08-11 Thread Bengt Richter
On Thu, 11 Aug 2005 14:55:57 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> Will/should an __init__.py in the current directory be required, >> to control what happens (and lessen the probability of accidental >> collision from a random working directory)? > >I don't think

Re: PEP 328, absolute/relative import

2005-08-11 Thread Peter Hansen
Bengt Richter wrote: > Will/should an __init__.py in the current directory be required, > to control what happens (and lessen the probability of accidental > collision from a random working directory)? I don't think so. That would simply shift the possibility of mysterious behaviour from the iss

Re: PEP 328, absolute/relative import

2005-08-11 Thread Bengt Richter
On Thu, 11 Aug 2005 08:25:26 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >Ben Finney wrote: >> Aahz <[EMAIL PROTECTED]> wrote: >>>Ben Finney <[EMAIL PROTECTED]> wrote: So, under PEP 328 rules, the original poster's current-directory module could only be imported (a) if the current dire

Re: PEP 328, absolute/relative import

2005-08-11 Thread Peter Hansen
Ben Finney wrote: > Aahz <[EMAIL PROTECTED]> wrote: >>Ben Finney <[EMAIL PROTECTED]> wrote: >>>So, under PEP 328 rules, the original poster's current-directory >>>module could only be imported (a) if the current directory was in >>>sys.path, or (b) if the code specified a relative import. The >>>a

Re: PEP 328, absolute/relative import

2005-08-10 Thread Ben Finney
Aahz <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> wrote: > >So, under PEP 328 rules, the original poster's current-directory > >module could only be imported (a) if the current directory was in > >sys.path, or (b) if the code specified a relative import. The > >accidental shadowing

Re: PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > >So, under PEP 328 rules, the original poster's current-directory >module could only be imported (a) if the current directory was in >sys.path, or (b) if the code specified a relative import. The >accidental shadowing of the s

Re: PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Roy Smith
Ben Finney <[EMAIL PROTECTED]> wrote: > Once PEP 328 is fully implemented, all bare 'import foo' statements > specify absolute imports (i.e. from sys.path only). To perform a > relative import (e.g. from current directory) will require different > syntax. It seems like this will break lots of exis

Re: PEP 328, absolute/relative import

2005-08-10 Thread Christopher Subich
Ben Finney wrote: > Once PEP 328 is fully implemented, all bare 'import foo' statements > specify absolute imports (i.e. from sys.path only). To perform a > relative import (e.g. from current directory) will require different > syntax. I'm not completely familiar with either, but how will that inf

PEP 328, absolute/relative import (was: Re: Bizarre error from help())

2005-08-10 Thread Ben Finney
Peter Hansen <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > Roy Smith <[EMAIL PROTECTED]> wrote: > >>[current-directory module shadowing a system module] > > > > All hail the coming of PEP 328: > > http://www.python.org/peps/pep-0328.html> > > Which, unless I misunderstand, would do nothi