[ python-Bugs-977250 ] Double __init__.py executing
SourceForge.net
noreply at sourceforge.net
Tue Jun 22 02:55:07 EDT 2004
Bugs item #977250, was opened at 2004-06-22 10:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977250&group_id=5470
Category: Parser/Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexandre (kuskakus)
Assigned to: Nobody/Anonymous (nobody)
Summary: Double __init__.py executing
Initial Comment:
There is some strange feature, looking like a bug.
I have 'pkg' dir with 2 files:
./pkg/__init__.py
print '__init__.py'
./pkg/test.py
print 'test.py'
import __init__
Python 2.3.4 (#53, May 25 2004, 21:17:02)
>>> import pkg.test
__init__.py
test.py
__init__.py
With '-v' option:
>>> import pkg.test
import pkg # directory pkg
# pkg\__init__.pyc matches pkg\__init__.py
import pkg # precompiled from pkg\__init__.pyc
__init__.py
# pkg\test.pyc matches pkg\test.py
import pkg.test # precompiled from pkg\test.pyc
test.py
# pkg\__init__.pyc matches pkg\__init__.py
import pkg.__init__ # precompiled from pkg\__init__.pyc
__init__.py
Why __init__.py executed two times?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977250&group_id=5470
More information about the Python-bugs-list
mailing list