[Python-bugs-list] [Bug #115528] import creates extra modules if in working directory
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 27 Sep 2000 20:08:35 -0700
Bug #115528, was updated on 2000-Sep-27 20:08
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: import creates extra modules if in working directory
Details: Given the directory structure:
lib/
foo/
__init__.py
bar.py
and PYTHONPATH includes lib
If my current working directory is lib/foo, then
>>> import bar
>>> print bar.__file__
bar.py
>>> import foo.bar
>>> print foo.bar.__file__
lib/foo/bar.py
>>> print bar == foo.bar
0
I think that any one file should produce only one module at runtime and this behavior is wrong.
The reason I am trying to count on file-module mapping is because I was to index some behavior by class, and if I can't count on classes from the same file testing identical then I'm stuck.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115528&group_id=5470