Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread Arnaud Delobelle
Eric Hanchrow <[EMAIL PROTECTED]> writes: > (This is with Python 2.5.2, on Ubuntu Hardy, if it matters.) > > This seems so basic that I'm surprised that I didn't find anything > about it in the FAQ. (Yes, I am fairly new to Python.) > > Here are three tiny files: > > mut.py > > impo

Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread Ben Finney
offby1 <[EMAIL PROTECTED]> writes: > Ah. So from the point of view of mut.py, "thing" and "system.thing" > are separate, unrelated variables; No. Thinking of them as "variables" (with all the non-Python terminological baggage that implies) will only exacerbate the confusion. "thing" and "system

Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread Chuckk Hubbard
:'( I'm confused On Fri, May 9, 2008 at 12:03 AM, offby1 <[EMAIL PROTECTED]> wrote: > Ah. So from the point of view of mut.py, "thing" and "system.thing" > are separate, unrelated variables; the former of which is initialized > from the latter when mut says "from system import thing". Thanks. >

Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread offby1
Ah. So from the point of view of mut.py, "thing" and "system.thing" are separate, unrelated variables; the former of which is initialized from the latter when mut says "from system import thing". Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread J. Cliff Dyer
On Thu, 2008-05-08 at 12:00 -0700, Eric Hanchrow wrote: > (This is with Python 2.5.2, on Ubuntu Hardy, if it matters.) > > This seems so basic that I'm surprised that I didn't find anything > about it in the FAQ. (Yes, I am fairly new to Python.) > > Here are three tiny files: > > mut.py =

Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread Eric Hanchrow
(This is with Python 2.5.2, on Ubuntu Hardy, if it matters.) This seems so basic that I'm surprised that I didn't find anything about it in the FAQ. (Yes, I am fairly new to Python.) Here are three tiny files: mut.py import system from system import thing def doit():