[IronPython] Import strangeness

Dino Viehland dinov at exchange.microsoft.com
Tue Aug 29 22:00:25 CEST 2006


Thanks for the bug report Seo - I've opened bug http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=2704



-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Monday, August 28, 2006 3:12 AM
To: Discussion of IronPython
Subject: [IronPython] Import strangeness

$ ipy test.py
1
$ python test.py
2

File contents follow: note that doing "import y" instead of "__import__" changes the result.

# test.py
import x.y

# x/__init__.py
#empty

# x/y.py
a = 1
y = __import__('y')
print y.a

# y.py
a = 2
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list