[IPython-User] ipython package import mechanism exhibits different behaviour

Antony Lee antony.lee@berkeley....
Mon Jul 30 03:03:16 CDT 2012


Say I create a numpy folder with an empty __init__.py and a version.py file
that defines version=42.
Now:
$ python -c "import numpy.version as v; print(v.version)"
42
$ ipython -c "import numpy.version as v; print(v.version)"
1.6.2
(and it's the same for Python2 and Python3).

Is that behaviour a bug, or documented somewhere?
Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120730/fa5e378c/attachment.html 


More information about the IPython-User mailing list