unexpected from/import statement behaviour
wuwei23 at gmail.com
Wed Aug 27 09:27:19 CEST 2008
nisp <emanuele.nesp... at gmail.com> wrote:
> I've always been convinced of the equivalence of the two ways of using
> the import statement but it's clear I'm wrong :-(
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sys import stderr
>>> import sys
>>> sys.stderr is stderr
Behaviourly, I'm finding no difference between the two either.
Could you cut & paste a minimal example that isn't producing the
correct behaviour, and perhaps mention what type of OS you're using?
More information about the Python-list